efi: Move grub_reboot() into kernel
[grub.git] / grub-core / Makefile.core.def
1 AutoGen definitions Makefile.tpl;
2
3 transform_data = {
4   installdir = noinst;
5   name = gensyminfo.sh;
6   common = gensyminfo.sh.in;
7 };
8
9 transform_data = {
10   installdir = noinst;
11   name = genmod.sh;
12   common = genmod.sh.in;
13 };
14
15 transform_data = {
16   installdir = noinst;
17   name = modinfo.sh;
18   common = modinfo.sh.in;
19 };
20
21 transform_data = {
22   installdir = platform;
23   name = gmodule.pl;
24   common = gmodule.pl.in;
25 };
26
27 transform_data = {
28   installdir = platform;
29   name = gdb_grub;
30   common = gdb_grub.in;
31 };
32
33 transform_data = {
34   installdir = platform;
35   name = grub.chrp;
36   common = boot/powerpc/grub.chrp.in;
37   enable = powerpc_ieee1275;
38 };
39
40 transform_data = {
41   installdir = platform;
42   name = bootinfo.txt;
43   common = boot/powerpc/bootinfo.txt.in;
44   enable = powerpc_ieee1275;
45 };
46
47 kernel = {
48   name = kernel;
49
50   nostrip = emu;
51
52   emu_ldflags              = '-Wl,-r,-d';
53   i386_efi_ldflags         = '-Wl,-r,-d';
54   i386_efi_stripflags      = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
55   x86_64_efi_ldflags       = '-Wl,-r,-d';
56   x86_64_efi_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
57
58   ia64_efi_cflags = '-fno-builtin -fpic -minline-int-divide-max-throughput';
59   ia64_efi_ldflags = '-Wl,-r,-d';
60   ia64_efi_stripflags = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
61
62   arm_efi_ldflags          = '-Wl,-r,-d';
63   arm_efi_stripflags       = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
64
65   arm64_efi_ldflags          = '-Wl,-r,-d';
66   arm64_efi_stripflags       = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version -R .eh_frame';
67
68   i386_pc_ldflags          = '$(TARGET_IMG_LDFLAGS)';
69   i386_pc_ldflags          = '$(TARGET_IMG_BASE_LDOPT),0x9000';
70   i386_qemu_ldflags        = '$(TARGET_IMG_LDFLAGS)';
71   i386_qemu_ldflags        = '$(TARGET_IMG_BASE_LDOPT),0x9000';
72   i386_coreboot_ldflags    = '$(TARGET_IMG_LDFLAGS)';
73   i386_coreboot_ldflags    = '$(TARGET_IMG_BASE_LDOPT),0x9000';
74   i386_multiboot_ldflags   = '$(TARGET_IMG_LDFLAGS)';
75   i386_multiboot_ldflags   = '$(TARGET_IMG_BASE_LDOPT),0x9000';
76   i386_ieee1275_ldflags    = '$(TARGET_IMG_LDFLAGS)';
77   i386_ieee1275_ldflags    = '$(TARGET_IMG_BASE_LDOPT),0x10000';
78   i386_xen_ldflags         = '$(TARGET_IMG_LDFLAGS)';
79   i386_xen_ldflags         = '$(TARGET_IMG_BASE_LDOPT),0';
80   x86_64_xen_ldflags       = '$(TARGET_IMG_LDFLAGS)';
81   x86_64_xen_ldflags       = '$(TARGET_IMG_BASE_LDOPT),0';
82
83   mips_loongson_ldflags    = '-Wl,-Ttext,0x80200000';
84   powerpc_ieee1275_ldflags = '-Wl,-Ttext,0x200000';
85   sparc64_ieee1275_ldflags = '-Wl,-Ttext,0x4400';
86   mips_arc_ldflags    = '-Wl,-Ttext,$(TARGET_LINK_ADDR)';
87   mips_qemu_mips_ldflags    = '-Wl,-Ttext,0x80200000';
88
89   mips_arc_cppflags = '-DGRUB_DECOMPRESSOR_LINK_ADDR=$(TARGET_DECOMPRESSOR_LINK_ADDR)';
90   i386_qemu_cppflags     = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
91   emu_cflags = '$(CFLAGS_GNULIB)';
92   emu_cppflags = '$(CPPFLAGS_GNULIB)';
93   arm_uboot_ldflags       = '-Wl,-r,-d';
94   arm_uboot_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
95   arm_coreboot_ldflags       = '-Wl,-r,-d';
96   arm_coreboot_stripflags    = '--strip-unneeded -K start -R .note -R .comment -R .note.gnu.gold-version';
97
98   i386_pc_startup = kern/i386/pc/startup.S;
99   i386_efi_startup = kern/i386/efi/startup.S;
100   x86_64_efi_startup = kern/x86_64/efi/startup.S;
101   i386_xen_startup = kern/i386/xen/startup.S;
102   x86_64_xen_startup = kern/x86_64/xen/startup.S;
103   i386_qemu_startup = kern/i386/qemu/startup.S;
104   i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
105   i386_coreboot_startup = kern/i386/coreboot/startup.S;
106   i386_multiboot_startup = kern/i386/coreboot/startup.S;
107   mips_startup = kern/mips/startup.S;
108   sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
109   powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
110   arm_uboot_startup = kern/arm/startup.S;
111   arm_coreboot_startup = kern/arm/startup.S;
112   arm_efi_startup = kern/arm/efi/startup.S;
113   arm64_efi_startup = kern/arm64/efi/startup.S;
114
115   common = kern/command.c;
116   common = kern/corecmd.c;
117   common = kern/device.c;
118   common = kern/disk.c;
119   common = kern/dl.c;
120   common = kern/env.c;
121   common = kern/err.c;
122   common = kern/file.c;
123   common = kern/fs.c;
124   common = kern/list.c;
125   common = kern/main.c;
126   common = kern/misc.c;
127   common = kern/parser.c;
128   common = kern/partition.c;
129   common = kern/rescue_parser.c;
130   common = kern/rescue_reader.c;
131   common = kern/term.c;
132
133   noemu = kern/compiler-rt.c;
134   noemu = kern/mm.c;
135   noemu = kern/time.c;
136   noemu = kern/generic/millisleep.c;
137
138   noemu_nodist = symlist.c;
139
140   mips = kern/generic/rtc_get_time_ms.c;
141
142   ieee1275 = disk/ieee1275/ofdisk.c;
143   ieee1275 = kern/ieee1275/cmain.c;
144   ieee1275 = kern/ieee1275/ieee1275.c;
145   ieee1275 = kern/ieee1275/mmap.c;
146   ieee1275 = kern/ieee1275/openfw.c;
147   ieee1275 = term/ieee1275/console.c;
148   ieee1275 = kern/ieee1275/init.c;
149
150   uboot = disk/uboot/ubootdisk.c;
151   uboot = kern/uboot/uboot.c;
152   uboot = kern/uboot/init.c;
153   uboot = kern/uboot/hw.c;
154   uboot = term/uboot/console.c;
155   arm_uboot = kern/arm/uboot/init.c;
156   arm_uboot = kern/arm/uboot/uboot.S;
157
158   arm_coreboot = kern/arm/coreboot/init.c;
159   arm_coreboot = kern/arm/coreboot/timer.c;
160   arm_coreboot = kern/arm/coreboot/coreboot.S;
161   arm_coreboot = lib/fdt.c;
162   arm_coreboot = bus/fdt.c;
163   arm_coreboot = term/ps2.c;
164   arm_coreboot = term/arm/pl050.c;
165   arm_coreboot = term/arm/cros.c;
166   arm_coreboot = term/arm/cros_ec.c;
167   arm_coreboot = bus/spi/rk3288_spi.c;
168   arm_coreboot = commands/keylayouts.c;
169   arm_coreboot = kern/arm/coreboot/dma.c;
170
171   terminfoinkernel = term/terminfo.c;
172   terminfoinkernel = term/tparm.c;
173   terminfoinkernel = commands/extcmd.c;
174   terminfoinkernel = lib/arg.c;
175
176   softdiv = lib/division.c;
177
178   i386 = kern/i386/dl.c;
179   i386_xen = kern/i386/dl.c;
180
181   i386_coreboot = kern/i386/coreboot/init.c;
182   i386_multiboot = kern/i386/coreboot/init.c;
183   i386_qemu = kern/i386/qemu/init.c;
184   i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
185   coreboot = video/coreboot/cbfb.c;
186
187   efi = disk/efi/efidisk.c;
188   efi = kern/efi/efi.c;
189   efi = kern/efi/init.c;
190   efi = kern/efi/mm.c;
191   efi = term/efi/console.c;
192   efi = kern/acpi.c;
193   efi = kern/efi/acpi.c;
194   i386_coreboot = kern/i386/pc/acpi.c;
195   i386_multiboot = kern/i386/pc/acpi.c;
196   i386_coreboot = kern/acpi.c;
197   i386_multiboot = kern/acpi.c;
198
199   x86 = kern/i386/tsc.c;
200   x86 = kern/i386/tsc_pit.c;
201   i386_efi = kern/i386/efi/tsc.c;
202   x86_64_efi = kern/i386/efi/tsc.c;
203   i386_efi = kern/i386/tsc_pmtimer.c;
204   i386_coreboot = kern/i386/tsc_pmtimer.c;
205   x86_64_efi = kern/i386/tsc_pmtimer.c;
206
207   i386_efi = kern/i386/efi/init.c;
208   i386_efi = bus/pci.c;
209
210   x86_64 = kern/x86_64/dl.c;
211   x86_64_xen = kern/x86_64/dl.c;
212   x86_64_efi = kern/x86_64/efi/callwrap.S;
213   x86_64_efi = kern/i386/efi/init.c;
214   x86_64_efi = bus/pci.c;
215
216   xen = kern/i386/tsc.c;
217   xen = kern/i386/xen/tsc.c;
218   x86_64_xen = kern/x86_64/xen/hypercall.S;
219   i386_xen = kern/i386/xen/hypercall.S;
220   xen = kern/xen/init.c;
221   xen = term/xen/console.c;
222   xen = disk/xen/xendisk.c;
223   xen = commands/boot.c;
224
225   ia64_efi = kern/ia64/efi/startup.S;
226   ia64_efi = kern/ia64/efi/init.c;
227   ia64_efi = kern/ia64/dl.c;
228   ia64_efi = kern/ia64/dl_helper.c;
229   ia64_efi = kern/ia64/cache.c;
230
231   arm_efi = kern/arm/efi/init.c;
232   arm_efi = kern/arm/efi/misc.c;
233   arm_efi = kern/efi/fdt.c;
234
235   arm64_efi = kern/arm64/efi/init.c;
236   arm64_efi = kern/efi/fdt.c;
237
238   i386_pc = kern/i386/pc/init.c;
239   i386_pc = kern/i386/pc/mmap.c;
240   i386_pc = term/i386/pc/console.c;
241
242   i386_qemu = bus/pci.c;
243   i386_qemu = kern/vga_init.c;
244   i386_qemu = kern/i386/qemu/mmap.c;
245
246   coreboot = kern/coreboot/mmap.c;
247   i386_coreboot = kern/i386/coreboot/cbtable.c;
248   coreboot = kern/coreboot/cbtable.c;
249   arm_coreboot = kern/arm/coreboot/cbtable.c;
250
251   i386_multiboot = kern/i386/multiboot_mmap.c;
252
253   mips = kern/mips/cache.S;
254   mips = kern/mips/dl.c;
255   mips = kern/mips/init.c;
256
257   mips_qemu_mips = kern/mips/qemu_mips/init.c;
258   mips_qemu_mips = term/ns8250.c;
259   mips_qemu_mips = term/serial.c;
260   mips_qemu_mips = term/at_keyboard.c;
261   mips_qemu_mips = term/ps2.c;
262   mips_qemu_mips = commands/boot.c;
263   mips_qemu_mips = commands/keylayouts.c;
264   mips_qemu_mips = term/i386/pc/vga_text.c;
265   mips_qemu_mips = kern/vga_init.c;
266
267   mips_arc = kern/mips/arc/init.c;
268   mips_arc = term/arc/console.c;
269   mips_arc = disk/arc/arcdisk.c;
270
271   mips_loongson = term/ns8250.c;
272   mips_loongson = bus/bonito.c;
273   mips_loongson = bus/cs5536.c;
274   mips_loongson = bus/pci.c;
275   mips_loongson = kern/mips/loongson/init.c;
276   mips_loongson = term/at_keyboard.c;
277   mips_loongson = term/ps2.c;
278   mips_loongson = commands/boot.c;
279   mips_loongson = term/serial.c;
280   mips_loongson = video/sm712.c;
281   mips_loongson = video/sis315pro.c;
282   mips_loongson = video/radeon_fuloong2e.c;
283   mips_loongson = video/radeon_yeeloong3a.c;
284   extra_dist = video/sm712_init.c;
285   extra_dist = video/sis315_init.c;
286   mips_loongson = commands/keylayouts.c;
287
288   powerpc_ieee1275 = kern/powerpc/cache.S;
289   powerpc_ieee1275 = kern/powerpc/dl.c;
290   powerpc_ieee1275 = kern/powerpc/compiler-rt.S;
291
292   sparc64_ieee1275 = kern/sparc64/cache.S;
293   sparc64_ieee1275 = kern/sparc64/dl.c;
294   sparc64_ieee1275 = kern/sparc64/ieee1275/ieee1275.c;
295
296   arm = kern/arm/dl.c;
297   arm = kern/arm/dl_helper.c;
298   arm = kern/arm/cache_armv6.S;
299   arm = kern/arm/cache_armv7.S;
300   extra_dist = kern/arm/cache.S;
301   arm = kern/arm/cache.c;
302   arm = kern/arm/compiler-rt.S;
303
304   arm64 = kern/arm64/cache.c;
305   arm64 = kern/arm64/cache_flush.S;
306   arm64 = kern/arm64/dl.c;
307   arm64 = kern/arm64/dl_helper.c;
308
309   emu = disk/host.c;
310   emu = kern/emu/cache_s.S;
311   emu = kern/emu/hostdisk.c;
312   emu = osdep/unix/hostdisk.c;
313   emu = osdep/exec.c;
314   extra_dist = osdep/unix/exec.c;
315   emu = osdep/devmapper/hostdisk.c;
316   emu = osdep/hostdisk.c;
317   emu = kern/emu/hostfs.c;
318   emu = kern/emu/main.c;
319   emu = kern/emu/argp_common.c;
320   emu = kern/emu/misc.c;
321   emu = kern/emu/mm.c;
322   emu = kern/emu/time.c;
323   emu = kern/emu/cache.c;
324   emu = osdep/emuconsole.c;
325   extra_dist = osdep/unix/emuconsole.c;
326   extra_dist = osdep/windows/emuconsole.c;
327   emu = osdep/dl.c;
328   extra_dist = osdep/unix/dl.c;
329   extra_dist = osdep/windows/dl.c;
330   emu = osdep/sleep.c;
331   emu = osdep/init.c;
332   emu = osdep/emunet.c;
333   extra_dist = osdep/linux/emunet.c;
334   extra_dist = osdep/basic/emunet.c;
335   emu = osdep/cputime.c;
336   extra_dist = osdep/unix/cputime.c;
337   extra_dist = osdep/windows/cputime.c;
338
339   videoinkernel = term/gfxterm.c;
340   videoinkernel = font/font.c;
341   videoinkernel = font/font_cmd.c;
342   videoinkernel = io/bufio.c;
343   videoinkernel = video/fb/fbblit.c;
344   videoinkernel = video/fb/fbfill.c;
345   videoinkernel = video/fb/fbutil.c;
346   videoinkernel = video/fb/video_fb.c;
347   videoinkernel = video/video.c;
348
349   extra_dist = kern/i386/int.S;
350   extra_dist = kern/i386/realmode.S;
351   extra_dist = boot/i386/pc/lzma_decode.S;
352   extra_dist = kern/mips/cache_flush.S;
353 };
354
355 program = {
356   name = grub-emu;
357   mansection = 1;
358
359   emu = kern/emu/full.c;
360   emu_nodist = grub_emu_init.c;
361
362   ldadd = 'kernel.exec$(EXEEXT)';
363   ldadd = '$(MODULE_FILES)';
364   ldadd = 'gnulib/libgnu.a $(LIBINTL) $(LIBUTIL) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
365
366   enable = emu;
367 };
368
369 program = {
370   name = grub-emu-lite;
371
372   emu = kern/emu/lite.c;
373   emu_nodist = symlist.c;
374
375   ldadd = 'kernel.exec$(EXEEXT)';
376   ldadd = 'gnulib/libgnu.a $(LIBINTL) $(LIBUTIL) $(LIBSDL) $(LIBUSB) $(LIBPCIACCESS) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
377
378   enable = emu;
379 };
380
381 image = {
382   name = boot;
383   i386_pc = boot/i386/pc/boot.S;
384   i386_qemu = boot/i386/qemu/boot.S;
385   sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
386
387   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
388   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
389
390   i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)';
391   i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),$(GRUB_BOOT_MACHINE_LINK_ADDR)';
392   i386_qemu_ccasflags = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
393
394   sparc64_ieee1275_objcopyflags = '-O a.out-sunos-big';
395   sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000';
396
397   objcopyflags = '-O binary';
398   enable = i386_pc;
399   enable = i386_qemu;
400   enable = sparc64_ieee1275;
401 };
402
403 image = {
404   name = boot_hybrid;
405   i386_pc = boot/i386/pc/boot.S;
406
407   cppflags = '-DHYBRID_BOOT=1';
408   
409   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
410   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
411
412   objcopyflags = '-O binary';
413   enable = i386_pc;
414 };
415
416 image = {
417   name = cdboot;
418
419   i386_pc = boot/i386/pc/cdboot.S;
420   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
421   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
422
423   sparc64_ieee1275 = boot/sparc64/ieee1275/boot.S;
424   sparc64_ieee1275_objcopyflags = '-O a.out-sunos-big';
425   sparc64_ieee1275_ldflags = ' -Wl,-Ttext=0x4000';
426   sparc64_ieee1275_cppflags = '-DCDBOOT=1';
427
428   objcopyflags = '-O binary';
429
430   enable = sparc64_ieee1275;
431   enable = i386_pc;
432 };
433
434 image = {
435   name = pxeboot;
436   i386_pc = boot/i386/pc/pxeboot.S;
437
438   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
439   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x7C00';
440
441   objcopyflags = '-O binary';
442   enable = i386_pc;
443 };
444
445 image = {
446   name = diskboot;
447   i386_pc = boot/i386/pc/diskboot.S;
448
449   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
450   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8000';
451
452   sparc64_ieee1275 = boot/sparc64/ieee1275/diskboot.S;
453   sparc64_ieee1275_ldflags = '-Wl,-Ttext=0x4200';
454
455   objcopyflags = '-O binary';
456
457   enable = i386_pc;
458   enable = sparc64_ieee1275;
459 };
460
461 image = {
462   name = lnxboot;
463   i386_pc = boot/i386/pc/lnxboot.S;
464
465   i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)';
466   i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x6000';
467
468   objcopyflags = '-O binary';
469   enable = i386_pc;
470 };
471
472 image = {
473   name = xz_decompress;
474   mips = boot/mips/startup_raw.S;
475   common = boot/decompressor/minilib.c;
476   common = boot/decompressor/xz.c;
477   common = lib/xzembed/xz_dec_bcj.c;
478   common = lib/xzembed/xz_dec_lzma2.c;
479   common = lib/xzembed/xz_dec_stream.c;
480   common = kern/compiler-rt.c;
481
482   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -DGRUB_EMBED_DECOMPRESSOR=1';
483
484   objcopyflags = '-O binary';
485   mips_ldflags = '-Wl,-Ttext,$(TARGET_DECOMPRESSOR_LINK_ADDR)';
486   cflags = '-Wno-unreachable-code';
487   enable = mips;
488 };
489
490 image = {
491   name = none_decompress;
492   mips = boot/mips/startup_raw.S;
493   common = boot/decompressor/none.c;
494
495   cppflags = '-DGRUB_EMBED_DECOMPRESSOR=1';
496
497   objcopyflags = '-O binary';
498   mips_ldflags = '-Wl,-Ttext,$(TARGET_DECOMPRESSOR_LINK_ADDR)';
499   enable = mips;
500 };
501
502 image = {
503   name = lzma_decompress;
504   i386_pc = boot/i386/pc/startup_raw.S;
505   i386_pc_nodist = rs_decoder.h;
506
507   objcopyflags = '-O binary';
508   ldflags = '$(TARGET_IMG_LDFLAGS) $(TARGET_IMG_BASE_LDOPT),0x8200';
509   enable = i386_pc;
510 };
511
512 image = {
513   name = fwstart;
514   mips_loongson = boot/mips/loongson/fwstart.S;
515   objcopyflags = '-O binary';
516   ldflags = '-Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
517   enable = mips_loongson;
518 };
519
520 image = {
521   name = fwstart_fuloong2f;
522   mips_loongson = boot/mips/loongson/fuloong2f.S;
523   objcopyflags = '-O binary';
524   ldflags = '-Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
525   enable = mips_loongson;
526 };
527
528 module = {
529   name = disk;
530   common = lib/disk.c;
531   extra_dist = kern/disk_common.c;
532 };
533
534 module = {
535   name = trig;
536   common_nodist = trigtables.c;
537   extra_dist = gentrigtables.c;
538 };
539
540 module = {
541   name = cs5536;
542   x86 = bus/cs5536.c;
543   enable = x86;
544 };
545
546 module = {
547   name = lsspd;
548   mips_loongson = commands/mips/loongson/lsspd.c;
549   enable = mips_loongson;
550 };
551
552 module = {
553   name = usb;
554   common = bus/usb/usb.c;
555   common = bus/usb/usbtrans.c;
556   common = bus/usb/usbhub.c;
557   enable = usb;
558 };
559
560 module = {
561   name = usbserial_common;
562   common = bus/usb/serial/common.c;
563   enable = usb;
564 };
565
566 module = {
567   name = usbserial_pl2303;
568   common = bus/usb/serial/pl2303.c;
569   enable = usb;
570 };
571
572 module = {
573   name = usbserial_ftdi;
574   common = bus/usb/serial/ftdi.c;
575   enable = usb;
576 };
577
578 module = {
579   name = usbserial_usbdebug;
580   common = bus/usb/serial/usbdebug_late.c;
581   enable = usb;
582 };
583
584 module = {
585   name = uhci;
586   common = bus/usb/uhci.c;
587   enable = pci;
588 };
589
590 module = {
591   name = ohci;
592   common = bus/usb/ohci.c;
593   enable = pci;
594 };
595
596 module = {
597   name = ehci;
598   common = bus/usb/ehci.c;
599   arm_coreboot = bus/usb/ehci-fdt.c;
600   pci = bus/usb/ehci-pci.c;
601   enable = pci;
602   enable = arm_coreboot;
603 };
604
605 module = {
606   name = pci;
607   common = bus/pci.c;
608   i386_ieee1275 = bus/i386/ieee1275/pci.c;
609
610   enable = i386_pc;
611   enable = i386_ieee1275;
612   enable = i386_coreboot;
613   enable = i386_multiboot;
614 };
615
616 module = {
617   name = nativedisk;
618   common = commands/nativedisk.c;
619
620   enable = x86;
621   enable = mips_loongson;
622   enable = mips_qemu_mips;
623 };
624
625 module = {
626   name = emupci;
627   common = bus/emu/pci.c;
628   common = commands/lspci.c;
629
630   enable = emu;
631   condition = COND_GRUB_EMU_PCI;
632 };
633
634 module = {
635   name = lsdev;
636   common = commands/arc/lsdev.c;
637
638   enable = mips_arc;
639 };
640
641 module = {
642   name = lsxen;
643   common = commands/xen/lsxen.c;
644
645   enable = xen;
646 };
647
648 module = {
649   name = cmostest;
650   common = commands/i386/cmostest.c;
651   enable = cmos;
652 };
653
654 module = {
655   name = cmosdump;
656   common = commands/i386/cmosdump.c;
657   enable = cmos;
658 };
659
660 module = {
661   name = iorw;
662   common = commands/iorw.c;
663   enable = x86;
664 };
665
666 module = {
667   name = cbtable;
668   common = kern/i386/coreboot/cbtable.c;
669   common = kern/coreboot/cbtable.c;
670   enable = i386_pc;
671   enable = i386_efi;
672   enable = i386_qemu;
673   enable = i386_multiboot;
674   enable = i386_ieee1275;
675   enable = x86_64_efi;
676 };
677
678 module = {
679   name = cbtime;
680   common = commands/i386/coreboot/cb_timestamps.c;
681   enable = x86;
682 };
683
684 module = {
685   name = cbls;
686   common = commands/i386/coreboot/cbls.c;
687   enable = x86;
688 };
689
690 module = {
691   name = cbmemc;
692   common = term/i386/coreboot/cbmemc.c;
693   enable = x86;
694 };
695
696 module = {
697   name = regexp;
698   common = commands/regexp.c;
699   common = commands/wildcard.c;
700   common = gnulib/regex.c;
701   cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
702   cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB)';
703 };
704
705 module = {
706   name = acpi;
707
708   common = commands/acpi.c;
709   i386_pc = kern/acpi.c;
710   i386_pc = kern/i386/pc/acpi.c;
711
712   enable = efi;
713   enable = i386_pc;
714   enable = i386_coreboot;
715   enable = i386_multiboot;
716 };
717
718 module = {
719   name = lsacpi;
720
721   common = commands/lsacpi.c;
722
723   enable = efi;
724   enable = i386_pc;
725   enable = i386_coreboot;
726   enable = i386_multiboot;
727 };
728
729 module = {
730   name = lsefisystab;
731
732   common = commands/efi/lsefisystab.c;
733
734   enable = efi;
735 };
736
737 module = {
738   name = lssal;
739
740   common = commands/efi/lssal.c;
741
742   enable = efi;
743 };
744
745 module = {
746   name = lsefimmap;
747
748   common = commands/efi/lsefimmap.c;
749
750   enable = efi;
751 };
752
753 module = {
754   name = lsefi;
755   common = commands/efi/lsefi.c;
756   enable = efi;
757 };
758
759 module = {
760   name = efifwsetup;
761   efi = commands/efi/efifwsetup.c;
762   enable = efi;
763 };
764
765 module = {
766   name = blocklist;
767   common = commands/blocklist.c;
768 };
769
770 module = {
771   name = boot;
772   common = commands/boot.c;
773   i386_pc = lib/i386/pc/biosnum.c;
774   enable = x86;
775   enable = emu;
776   enable = sparc64_ieee1275;
777   enable = powerpc_ieee1275;
778   enable = mips_arc;
779   enable = ia64_efi;
780   enable = arm_efi;
781   enable = arm64_efi;
782   enable = arm_uboot;
783   enable = arm_coreboot;
784 };
785
786 module = {
787   name = cat;
788   common = commands/cat.c;
789 };
790
791 module = {
792   name = cmp;
793   common = commands/cmp.c;
794 };
795
796 module = {
797   name = configfile;
798   common = commands/configfile.c;
799 };
800
801 module = {
802   name = cpuid;
803   common = commands/i386/cpuid.c;
804   enable = x86;
805   enable = i386_xen;
806   enable = x86_64_xen;
807 };
808
809 module = {
810   name = date;
811   common = commands/date.c;
812 };
813
814 module = {
815   name = drivemap;
816
817   i386_pc = commands/i386/pc/drivemap.c;
818   i386_pc = commands/i386/pc/drivemap_int13h.S;
819   enable = i386_pc;
820 };
821
822 module = {
823   name = echo;
824   common = commands/echo.c;
825 };
826
827 module = {
828   name = eval;
829   common = commands/eval.c;
830 };
831
832 module = {
833   name = extcmd;
834   common = commands/extcmd.c;
835   common = lib/arg.c;
836   enable = terminfomodule;
837 };
838
839 module = {
840   name = fixvideo;
841   common = commands/efi/fixvideo.c;
842   enable = i386_efi;
843   enable = x86_64_efi;
844 };
845
846 module = {
847   name = gptsync;
848   common = commands/gptsync.c;
849 };
850
851 module = {
852   name = halt;
853   nopc = commands/halt.c;
854   i386_pc = commands/i386/pc/halt.c;
855   i386_pc = commands/acpihalt.c;
856   i386_coreboot = commands/acpihalt.c;
857   i386_multiboot = commands/acpihalt.c;
858   i386_efi = commands/acpihalt.c;
859   x86_64_efi = commands/acpihalt.c;
860   i386_multiboot = lib/i386/halt.c;
861   i386_coreboot = lib/i386/halt.c;
862   i386_qemu = lib/i386/halt.c;
863   xen = lib/xen/halt.c;
864   efi = lib/efi/halt.c;
865   ieee1275 = lib/ieee1275/halt.c;
866   emu = lib/emu/halt.c;
867   uboot = lib/dummy/halt.c;
868   arm_coreboot = lib/dummy/halt.c;
869 };
870
871 module = {
872   name = reboot;
873   i386 = lib/i386/reboot.c;
874   i386 = lib/i386/reboot_trampoline.S;
875   powerpc_ieee1275 = lib/ieee1275/reboot.c;
876   sparc64_ieee1275 = lib/ieee1275/reboot.c;
877   mips_arc = lib/mips/arc/reboot.c;
878   mips_loongson = lib/mips/loongson/reboot.c;
879   mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
880   xen = lib/xen/reboot.c;
881   uboot = lib/uboot/reboot.c;
882   arm_coreboot = lib/dummy/reboot.c;
883   common = commands/reboot.c;
884 };
885
886 module = {
887   name = hashsum;
888   common = commands/hashsum.c;
889 };
890
891 module = {
892   name = verify;
893   common = commands/verify.c;
894   cflags = '$(CFLAGS_POSIX)';
895   cppflags = '-I$(srcdir)/lib/posix_wrap';
896 };
897
898 module = {
899   name = hdparm;
900   common = commands/hdparm.c;
901   enable = pci;
902   enable = mips_qemu_mips;
903 };
904
905 module = {
906   name = help;
907   common = commands/help.c;
908 };
909
910 module = {
911   name = hexdump;
912   common = commands/hexdump.c;
913   common = lib/hexdump.c;
914 };
915
916 module = {
917   name = keystatus;
918   common = commands/keystatus.c;
919 };
920
921 module = {
922   name = loadbios;
923   common = commands/efi/loadbios.c;
924   enable = i386_efi;
925   enable = x86_64_efi;
926 };
927
928 module = {
929   name = loadenv;
930   common = commands/loadenv.c;
931   common = lib/envblk.c;
932 };
933
934 module = {
935   name = ls;
936   common = commands/ls.c;
937 };
938
939 module = {
940   name = lsmmap;
941   common = commands/lsmmap.c;
942 };
943
944 module = {
945   name = lspci;
946   common = commands/lspci.c;
947
948   enable = pci;
949 };
950
951 module = {
952   name = memrw;
953   common = commands/memrw.c;
954 };
955
956 module = {
957   name = minicmd;
958   common = commands/minicmd.c;
959 };
960
961 module = {
962   name = parttool;
963   common = commands/parttool.c;
964 };
965
966 module = {
967   name = password;
968   common = commands/password.c;
969 };
970
971 module = {
972   name = password_pbkdf2;
973   common = commands/password_pbkdf2.c;
974 };
975
976 module = {
977   name = play;
978   x86 = commands/i386/pc/play.c;
979   enable = x86;
980 };
981
982 module = {
983   name = spkmodem;
984   x86 = term/spkmodem.c;
985   enable = x86;
986 };
987
988 module = {
989   name = morse;
990   x86 = term/morse.c;
991   enable = x86;
992 };
993
994 module = {
995   name = probe;
996   common = commands/probe.c;
997 };
998
999 module = {
1000   name = read;
1001   common = commands/read.c;
1002 };
1003
1004 module = {
1005   name = search;
1006   common = commands/search_wrap.c;
1007   extra_dist = commands/search.c;
1008 };
1009
1010 module = {
1011   name = search_fs_file;
1012   common = commands/search_file.c;
1013 };
1014
1015 module = {
1016   name = search_fs_uuid;
1017   common = commands/search_uuid.c;
1018 };
1019
1020 module = {
1021   name = search_label;
1022   common = commands/search_label.c;
1023 };
1024
1025 module = {
1026   name = setpci;
1027   common = commands/setpci.c;
1028   enable = pci;
1029 };
1030
1031 module = {
1032   name = pcidump;
1033   common = commands/pcidump.c;
1034   enable = pci;
1035 };
1036
1037 module = {
1038   name = sleep;
1039   common = commands/sleep.c;
1040 };
1041
1042 module = {
1043   name = suspend;
1044   ieee1275 = commands/ieee1275/suspend.c;
1045   enable = i386_ieee1275;
1046   enable = powerpc_ieee1275;
1047 };
1048
1049 module = {
1050   name = escc;
1051   ieee1275 = term/ieee1275/escc.c;
1052   enable = powerpc_ieee1275;
1053 };
1054
1055 module = {
1056   name = terminal;
1057   common = commands/terminal.c;
1058 };
1059
1060 module = {
1061   name = test;
1062   common = commands/test.c;
1063 };
1064
1065 module = {
1066   name = true;
1067   common = commands/true.c;
1068 };
1069
1070 module = {
1071   name = usbtest;
1072   common = commands/usbtest.c;
1073   enable = usb;
1074 };
1075
1076 module = {
1077   name = videoinfo;
1078   common = commands/videoinfo.c;
1079 };
1080
1081 module = {
1082   name = videotest;
1083   common = commands/videotest.c;
1084 };
1085
1086 module = {
1087   name = xnu_uuid;
1088   common = commands/xnu_uuid.c;
1089 };
1090
1091 module = {
1092   name = dm_nv;
1093   common = disk/dmraid_nvidia.c;
1094 };
1095
1096 module = {
1097   name = loopback;
1098   common = disk/loopback.c;
1099 };
1100
1101 module = {
1102   name = cryptodisk;
1103   common = disk/cryptodisk.c;
1104 };
1105
1106 module = {
1107   name = luks;
1108   common = disk/luks.c;
1109   common = disk/AFSplitter.c;
1110 };
1111
1112 module = {
1113   name = geli;
1114   common = disk/geli.c;
1115 };
1116
1117 module = {
1118   name = lvm;
1119   common = disk/lvm.c;
1120 };
1121
1122 module = {
1123   name = ldm;
1124   common = disk/ldm.c;
1125 };
1126
1127 module = {
1128   name = mdraid09;
1129   common = disk/mdraid_linux.c;
1130 };
1131
1132 module = {
1133   name = mdraid09_be;
1134   common = disk/mdraid_linux_be.c;
1135 };
1136
1137 module = {
1138   name = mdraid1x;
1139   common = disk/mdraid1x_linux.c;
1140 };
1141
1142 module = {
1143   name = diskfilter;
1144   common = disk/diskfilter.c;
1145 };
1146
1147 module = {
1148   name = raid5rec;
1149   common = disk/raid5_recover.c;
1150 };
1151
1152 module = {
1153   name = raid6rec;
1154   common = disk/raid6_recover.c;
1155 };
1156
1157 module = {
1158   name = scsi;
1159   common = disk/scsi.c;
1160 };
1161
1162 module = {
1163   name = memdisk;
1164   common = disk/memdisk.c;
1165 };
1166
1167 module = {
1168   name = ata;
1169   common = disk/ata.c;
1170   enable = pci;
1171   enable = mips_qemu_mips;
1172 };
1173
1174 module = {
1175   name = ahci;
1176   common = disk/ahci.c;
1177   enable = pci;
1178 };
1179
1180 module = {
1181   name = pata;
1182   common = disk/pata.c;
1183   enable = pci;
1184   enable = mips_qemu_mips;
1185 };
1186
1187 module = {
1188   name = biosdisk;
1189   i386_pc = disk/i386/pc/biosdisk.c;
1190   enable = i386_pc;
1191 };
1192
1193 module = {
1194   name = usbms;
1195   common = disk/usbms.c;
1196   enable = usb;
1197 };
1198
1199 module = {
1200   name = nand;
1201   ieee1275 = disk/ieee1275/nand.c;
1202   enable = i386_ieee1275;
1203 };
1204
1205 module = {
1206   name = efiemu;
1207   common = efiemu/main.c;
1208   common = efiemu/i386/loadcore32.c;
1209   common = efiemu/i386/loadcore64.c;
1210   i386_pc = efiemu/i386/pc/cfgtables.c;
1211   i386_coreboot = efiemu/i386/pc/cfgtables.c;
1212   i386_multiboot = efiemu/i386/pc/cfgtables.c;
1213   i386_ieee1275 = efiemu/i386/nocfgtables.c;
1214   i386_qemu = efiemu/i386/nocfgtables.c;
1215   common = efiemu/mm.c;
1216   common = efiemu/loadcore_common.c;
1217   common = efiemu/symbols.c;
1218   common = efiemu/loadcore32.c;
1219   common = efiemu/loadcore64.c;
1220   common = efiemu/prepare32.c;
1221   common = efiemu/prepare64.c;
1222   common = efiemu/pnvram.c;
1223   common = efiemu/i386/coredetect.c;
1224
1225   extra_dist = efiemu/prepare.c;
1226   extra_dist = efiemu/loadcore.c;
1227   extra_dist = efiemu/runtime/efiemu.S;
1228   extra_dist = efiemu/runtime/efiemu.c;
1229
1230   enable = i386_pc;
1231   enable = i386_coreboot;
1232   enable = i386_ieee1275;
1233   enable = i386_multiboot;
1234   enable = i386_qemu;
1235 };
1236
1237 module = {
1238   name = font;
1239   common = font/font.c;
1240   common = font/font_cmd.c;
1241   enable = videomodules;
1242 };
1243
1244 module = {
1245   name = procfs;
1246   common = fs/proc.c;
1247 };
1248
1249 module = {
1250   name = affs;
1251   common = fs/affs.c;
1252 };
1253
1254 module = {
1255   name = afs;
1256   common = fs/afs.c;
1257 };
1258
1259 module = {
1260   name = bfs;
1261   common = fs/bfs.c;
1262 };
1263
1264 module = {
1265   name = btrfs;
1266   common = fs/btrfs.c;
1267   common = lib/crc.c;
1268   cflags = '$(CFLAGS_POSIX) -Wno-undef';
1269   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
1270 };
1271
1272 module = {
1273   name = archelp;
1274   common = fs/archelp.c;
1275 };
1276
1277 module = {
1278   name = cbfs;
1279   common = fs/cbfs.c;
1280 };
1281
1282 module = {
1283   name = cpio;
1284   common = fs/cpio.c;
1285 };
1286
1287 module = {
1288   name = cpio_be;
1289   common = fs/cpio_be.c;
1290 };
1291
1292 module = {
1293   name = newc;
1294   common = fs/newc.c;
1295 };
1296
1297 module = {
1298   name = odc;
1299   common = fs/odc.c;
1300 };
1301
1302 module = {
1303   name = ext2;
1304   common = fs/ext2.c;
1305 };
1306
1307 module = {
1308   name = fat;
1309   common = fs/fat.c;
1310 };
1311
1312 module = {
1313   name = exfat;
1314   common = fs/exfat.c;
1315 };
1316
1317 module = {
1318   name = fshelp;
1319   common = fs/fshelp.c;
1320 };
1321
1322 module = {
1323   name = hfs;
1324   common = fs/hfs.c;
1325 };
1326
1327 module = {
1328   name = hfsplus;
1329   common = fs/hfsplus.c;
1330 };
1331
1332 module = {
1333   name = hfspluscomp;
1334   common = fs/hfspluscomp.c;
1335 };
1336
1337 module = {
1338   name = iso9660;
1339   common = fs/iso9660.c;
1340 };
1341
1342 module = {
1343   name = jfs;
1344   common = fs/jfs.c;
1345 };
1346
1347 module = {
1348   name = minix;
1349   common = fs/minix.c;
1350 };
1351
1352 module = {
1353   name = minix2;
1354   common = fs/minix2.c;
1355 };
1356
1357 module = {
1358   name = minix3;
1359   common = fs/minix3.c;
1360 };
1361
1362 module = {
1363   name = minix_be;
1364   common = fs/minix_be.c;
1365 };
1366
1367 module = {
1368   name = minix2_be;
1369   common = fs/minix2_be.c;
1370 };
1371
1372 module = {
1373   name = minix3_be;
1374   common = fs/minix3_be.c;
1375 };
1376
1377 module = {
1378   name = nilfs2;
1379   common = fs/nilfs2.c;
1380 };
1381
1382 module = {
1383   name = ntfs;
1384   common = fs/ntfs.c;
1385 };
1386
1387 module = {
1388   name = ntfscomp;
1389   common = fs/ntfscomp.c;
1390 };
1391
1392 module = {
1393   name = reiserfs;
1394   common = fs/reiserfs.c;
1395 };
1396
1397 module = {
1398   name = romfs;
1399   common = fs/romfs.c;
1400 };
1401
1402 module = {
1403   name = sfs;
1404   common = fs/sfs.c;
1405 };
1406
1407 module = {
1408   name = squash4;
1409   common = fs/squash4.c;
1410   cflags = '$(CFLAGS_POSIX) -Wno-undef';
1411   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
1412 };
1413
1414 module = {
1415   name = tar;
1416   common = fs/tar.c;
1417 };
1418
1419 module = {
1420   name = udf;
1421   common = fs/udf.c;
1422 };
1423
1424 module = {
1425   name = ufs1;
1426   common = fs/ufs.c;
1427 };
1428
1429 module = {
1430   name = ufs1_be;
1431   common = fs/ufs_be.c;
1432 };
1433
1434 module = {
1435   name = ufs2;
1436   common = fs/ufs2.c;
1437 };
1438
1439 module = {
1440   name = xfs;
1441   common = fs/xfs.c;
1442 };
1443
1444 module = {
1445   name = zfs;
1446   common = fs/zfs/zfs.c;
1447   common = fs/zfs/zfs_lzjb.c;
1448   common = fs/zfs/zfs_lz4.c;
1449   common = fs/zfs/zfs_sha256.c;
1450   common = fs/zfs/zfs_fletcher.c;
1451 };
1452
1453 module = {
1454   name = zfscrypt;
1455   common = fs/zfs/zfscrypt.c;
1456 };
1457
1458 module = {
1459   name = zfsinfo;
1460   common = fs/zfs/zfsinfo.c;
1461 };
1462
1463 module = {
1464   name = macbless;
1465   common = commands/macbless.c;
1466 };
1467
1468 module = {
1469   name = pxe;
1470   i386_pc = net/drivers/i386/pc/pxe.c;
1471   enable = i386_pc;
1472 };
1473
1474 module = {
1475   name = gettext;
1476   common = gettext/gettext.c;
1477 };
1478
1479 module = {
1480   name = gfxmenu;
1481   common = gfxmenu/gfxmenu.c;
1482   common = gfxmenu/view.c;
1483   common = gfxmenu/font.c;
1484   common = gfxmenu/icon_manager.c;
1485   common = gfxmenu/theme_loader.c;
1486   common = gfxmenu/widget-box.c;
1487   common = gfxmenu/gui_canvas.c;
1488   common = gfxmenu/gui_circular_progress.c;
1489   common = gfxmenu/gui_box.c;
1490   common = gfxmenu/gui_label.c;
1491   common = gfxmenu/gui_list.c;
1492   common = gfxmenu/gui_image.c;
1493   common = gfxmenu/gui_progress_bar.c;
1494   common = gfxmenu/gui_util.c;
1495   common = gfxmenu/gui_string_util.c;
1496 };
1497
1498 module = {
1499   name = hello;
1500   common = hello/hello.c;
1501 };
1502
1503 module = {
1504   name = gzio;
1505   common = io/gzio.c;
1506 };
1507
1508 module = {
1509   name = offsetio;
1510   common = io/offset.c;
1511 };
1512
1513 module = {
1514   name = bufio;
1515   common = io/bufio.c;
1516   enable = videomodules;
1517 };
1518
1519 module = {
1520   name = elf;
1521   common = kern/elf.c;
1522
1523   extra_dist = kern/elfXX.c;
1524 };
1525
1526 module = {
1527   name = crypto;
1528   common = lib/crypto.c;
1529
1530   extra_dist = lib/libgcrypt-grub/cipher/crypto.lst;
1531 };
1532
1533 module = {
1534   name = pbkdf2;
1535   common = lib/pbkdf2.c;
1536 };
1537
1538 module = {
1539   name = relocator;
1540   common = lib/relocator.c;
1541   x86 = lib/i386/relocator16.S;
1542   x86 = lib/i386/relocator32.S;
1543   x86 = lib/i386/relocator64.S;
1544   i386 = lib/i386/relocator_asm.S;
1545   x86_64 = lib/x86_64/relocator_asm.S;
1546   i386_xen = lib/i386/relocator_asm.S;
1547   x86_64_xen = lib/x86_64/relocator_asm.S;
1548   x86 = lib/i386/relocator.c;
1549   x86 = lib/i386/relocator_common_c.c;
1550   ieee1275 = lib/ieee1275/relocator.c;
1551   efi = lib/efi/relocator.c;
1552   mips = lib/mips/relocator_asm.S;
1553   mips = lib/mips/relocator.c;
1554   powerpc = lib/powerpc/relocator_asm.S;
1555   powerpc = lib/powerpc/relocator.c;
1556   xen = lib/xen/relocator.c;
1557   i386_xen = lib/i386/xen/relocator.S;
1558   x86_64_xen = lib/x86_64/xen/relocator.S;
1559   xen = lib/i386/relocator_common_c.c;
1560   x86_64_efi = lib/x86_64/efi/relocator.c;
1561
1562   extra_dist = lib/i386/relocator_common.S;
1563   extra_dist = kern/powerpc/cache_flush.S;
1564
1565   enable = mips;
1566   enable = powerpc;
1567   enable = x86;
1568   enable = xen;
1569 };
1570
1571 module = {
1572   name = datetime;
1573   cmos = lib/cmos_datetime.c;
1574   efi = lib/efi/datetime.c;
1575   uboot = lib/dummy/datetime.c;
1576   arm_coreboot = lib/dummy/datetime.c;
1577   sparc64_ieee1275 = lib/ieee1275/datetime.c;
1578   powerpc_ieee1275 = lib/ieee1275/datetime.c;
1579   sparc64_ieee1275 = lib/ieee1275/cmos.c;
1580   powerpc_ieee1275 = lib/ieee1275/cmos.c;
1581   xen = lib/xen/datetime.c;
1582
1583   mips_arc = lib/arc/datetime.c;
1584   enable = noemu;
1585 };
1586
1587 module = {
1588   name = setjmp;
1589   common = lib/setjmp.S;
1590   extra_dist = lib/i386/setjmp.S;
1591   extra_dist = lib/mips/setjmp.S;
1592   extra_dist = lib/x86_64/setjmp.S;
1593   extra_dist = lib/sparc64/setjmp.S;
1594   extra_dist = lib/powerpc/setjmp.S;
1595   extra_dist = lib/ia64/setjmp.S;
1596   extra_dist = lib/ia64/longjmp.S;
1597   extra_dist = lib/arm/setjmp.S;
1598   extra_dist = lib/arm64/setjmp.S;
1599 };
1600
1601 module = {
1602   name = aout;
1603   common = loader/aout.c;
1604   enable = x86;
1605 };
1606
1607 module = {
1608   name = bsd;
1609   x86 = loader/i386/bsd.c;
1610   x86 = loader/i386/bsd32.c;
1611   x86 = loader/i386/bsd64.c;
1612
1613   extra_dist = loader/i386/bsdXX.c;
1614   extra_dist = loader/i386/bsd_pagetable.c;
1615
1616   enable = x86;
1617 };
1618
1619 module = {
1620   name = plan9;
1621   i386_pc = loader/i386/pc/plan9.c;
1622   enable = i386_pc;
1623 };
1624
1625
1626 module = {
1627   name = linux16;
1628   common = loader/i386/pc/linux.c;
1629   enable = x86;
1630 };
1631
1632 module = {
1633   name = ntldr;
1634   i386_pc = loader/i386/pc/ntldr.c;
1635   enable = i386_pc;
1636 };
1637
1638
1639 module = {
1640   name = truecrypt;
1641   i386_pc = loader/i386/pc/truecrypt.c;
1642   enable = i386_pc;
1643 };
1644
1645
1646 module = {
1647   name = freedos;
1648   i386_pc = loader/i386/pc/freedos.c;
1649   enable = i386_pc;
1650 };
1651
1652 module = {
1653   name = pxechain;
1654   i386_pc = loader/i386/pc/pxechainloader.c;
1655   enable = i386_pc;
1656 };
1657
1658 module = {
1659   name = multiboot2;
1660   cppflags = "-DGRUB_USE_MULTIBOOT2";
1661
1662   common = loader/multiboot.c;
1663   common = loader/multiboot_mbi2.c;
1664   enable = x86;
1665   enable = mips;
1666 };
1667
1668 module = {
1669   name = multiboot;
1670   common = loader/multiboot.c;
1671   x86 = loader/i386/multiboot_mbi.c;
1672   extra_dist = loader/multiboot_elfxx.c;
1673   enable = x86;
1674 };
1675
1676 module = {
1677   name = xen_boot;
1678   arm64 = loader/arm64/xen_boot.c;
1679   enable = arm64;
1680 };
1681
1682 module = {
1683   name = linux;
1684   x86 = loader/i386/linux.c;
1685   xen = loader/i386/xen.c;
1686   i386_pc = lib/i386/pc/vesa_modes_table.c;
1687   mips = loader/mips/linux.c;
1688   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
1689   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
1690   ia64_efi = loader/ia64/efi/linux.c;
1691   arm = loader/arm/linux.c;
1692   arm64 = loader/arm64/linux.c;
1693   common = loader/linux.c;
1694   common = lib/cmdline.c;
1695   enable = noemu;
1696 };
1697
1698 module = {
1699   name = fdt;
1700   arm64 = loader/efi/fdt.c;
1701   common = lib/fdt.c;
1702   enable = fdt;
1703 };
1704
1705 module = {
1706   name = xnu;
1707   x86 = loader/xnu_resume.c;
1708   x86 = loader/i386/xnu.c;
1709   x86 = loader/xnu.c;
1710
1711   /* Code is pretty generic but relies on RNG which
1712      is available only on few platforms. It's not a
1713      big deal as xnu needs ACPI anyway and we have
1714      RNG on all platforms with ACPI.
1715    */
1716   enable = i386_multiboot;
1717   enable = i386_coreboot;
1718   enable = i386_pc;
1719   enable = i386_efi;
1720   enable = x86_64_efi;
1721 };
1722
1723 module = {
1724   name = random;
1725   x86 = lib/i386/random.c;
1726   common = lib/random.c;
1727
1728   i386_multiboot = kern/i386/tsc_pmtimer.c;
1729   i386_coreboot = kern/i386/tsc_pmtimer.c;
1730   i386_pc = kern/i386/tsc_pmtimer.c;
1731
1732   enable = i386_multiboot;
1733   enable = i386_coreboot;
1734   enable = i386_pc;
1735   enable = i386_efi;
1736   enable = x86_64_efi;
1737 };
1738
1739 module = {
1740   name = macho;
1741
1742   common = loader/macho.c;
1743   common = loader/macho32.c;
1744   common = loader/macho64.c;
1745   common = loader/lzss.c;
1746   extra_dist = loader/machoXX.c;
1747 };
1748
1749 module = {
1750   name = appleldr;
1751   common = loader/efi/appleloader.c;
1752   enable = i386_efi;
1753   enable = x86_64_efi;
1754 };
1755
1756 module = {
1757   name = chain;
1758   efi = loader/efi/chainloader.c;
1759   i386_pc = loader/i386/pc/chainloader.c;
1760   i386_coreboot = loader/i386/coreboot/chainloader.c;
1761   i386_coreboot = lib/LzmaDec.c;
1762   enable = i386_pc;
1763   enable = i386_coreboot;
1764   enable = efi;
1765 };
1766
1767 module = {
1768   name = mmap;
1769   common = mmap/mmap.c;
1770   x86 = mmap/i386/uppermem.c;
1771   x86 = mmap/i386/mmap.c;
1772
1773   i386_pc = mmap/i386/pc/mmap.c;
1774   i386_pc = mmap/i386/pc/mmap_helper.S;
1775
1776   efi = mmap/efi/mmap.c;
1777
1778   mips = mmap/mips/uppermem.c;
1779
1780   enable = x86;
1781   enable = ia64_efi;
1782   enable = arm_efi;
1783   enable = arm64_efi;
1784   enable = mips;
1785 };
1786
1787 module = {
1788   name = normal;
1789   common = normal/main.c;
1790   common = normal/cmdline.c;
1791   common = normal/dyncmd.c;
1792   common = normal/auth.c;
1793   common = normal/autofs.c;
1794   common = normal/color.c;
1795   common = normal/completion.c;
1796   common = normal/datetime.c;
1797   common = normal/menu.c;
1798   common = normal/menu_entry.c;
1799   common = normal/menu_text.c;
1800   common = normal/misc.c;
1801   common = normal/crypto.c;
1802   common = normal/term.c;
1803   common = normal/context.c;
1804   common = normal/charset.c;
1805   common = lib/getline.c;
1806
1807   common = script/main.c;
1808   common = script/script.c;
1809   common = script/execute.c;
1810   common = script/function.c;
1811   common = script/lexer.c;
1812   common = script/argv.c;
1813
1814   common = commands/menuentry.c;
1815
1816   common = unidata.c;
1817   common_nodist = grub_script.tab.c;
1818   common_nodist = grub_script.yy.c;
1819   common_nodist = grub_script.tab.h;
1820   common_nodist = grub_script.yy.h;
1821
1822   extra_dist = script/yylex.l;
1823   extra_dist = script/parser.y;
1824
1825   cflags = '$(CFLAGS_POSIX) -Wno-redundant-decls';
1826   cppflags = '$(CPPFLAGS_POSIX)';
1827 };
1828
1829 module = {
1830   name = part_acorn;
1831   common = partmap/acorn.c;
1832 };
1833
1834 module = {
1835   name = part_amiga;
1836   common = partmap/amiga.c;
1837 };
1838
1839 module = {
1840   name = part_apple;
1841   common = partmap/apple.c;
1842 };
1843
1844 module = {
1845   name = part_gpt;
1846   common = partmap/gpt.c;
1847 };
1848
1849 module = {
1850   name = part_msdos;
1851   common = partmap/msdos.c;
1852 };
1853
1854 module = {
1855   name = part_sun;
1856   common = partmap/sun.c;
1857 };
1858
1859 module = {
1860   name = part_plan;
1861   common = partmap/plan.c;
1862 };
1863
1864 module = {
1865   name = part_dvh;
1866   common = partmap/dvh.c;
1867 };
1868
1869 module = {
1870   name = part_bsd;
1871   common = partmap/bsdlabel.c;
1872 };
1873
1874 module = {
1875   name = part_sunpc;
1876   common = partmap/sunpc.c;
1877 };
1878
1879 module = {
1880   name = part_dfly;
1881   common = partmap/dfly.c;
1882 };
1883
1884 module = {
1885   name = msdospart;
1886   common = parttool/msdospart.c;
1887 };
1888
1889 module = {
1890   name = at_keyboard;
1891   common = term/at_keyboard.c;
1892   common = term/ps2.c;
1893   enable = x86;
1894 };
1895
1896 module = {
1897   name = gfxterm;
1898   common = term/gfxterm.c;
1899   enable = videomodules;
1900 };
1901
1902 module = {
1903   name = gfxterm_background;
1904   common = term/gfxterm_background.c;
1905 };
1906
1907 module = {
1908   name = serial;
1909   common = term/serial.c;
1910   x86 = term/ns8250.c;
1911   ieee1275 = term/ieee1275/serial.c;
1912   mips_arc = term/arc/serial.c;
1913   efi = term/efi/serial.c;
1914
1915   enable = terminfomodule;
1916   enable = ieee1275;
1917   enable = mips_arc;
1918 };
1919
1920 module = {
1921   name = sendkey;
1922   i386_pc = commands/i386/pc/sendkey.c;
1923   enable = i386_pc;
1924 };
1925
1926 module = {
1927   name = terminfo;
1928   common = term/terminfo.c;
1929   common = term/tparm.c;
1930   enable = terminfomodule;
1931 };
1932
1933 module = {
1934   name = usb_keyboard;
1935   common = term/usb_keyboard.c;
1936   enable = usb;
1937 };
1938
1939 module = {
1940   name = vga;
1941   common = video/i386/pc/vga.c;
1942   enable = i386_pc;
1943 };
1944
1945 module = {
1946   name = vga_text;
1947   common = term/i386/pc/vga_text.c;
1948   enable = i386_pc;
1949 };
1950
1951 module = {
1952   name = mda_text;
1953   common = term/i386/pc/mda_text.c;
1954   enable = i386_pc;
1955   enable = i386_coreboot_multiboot_qemu;
1956 };
1957
1958 module = {
1959   name = video_cirrus;
1960   x86 = video/cirrus.c;
1961   enable = x86;
1962 };
1963
1964 module = {
1965   name = video_bochs;
1966   x86 = video/bochs.c;
1967   enable = x86;
1968 };
1969
1970 module = {
1971   name = functional_test;
1972   common = tests/lib/functional_test.c;
1973   common = tests/lib/test.c;
1974   common = tests/checksums.h;
1975   common = tests/video_checksum.c;
1976   common = tests/fake_input.c;
1977   common = video/capture.c;
1978 };
1979
1980 module = {
1981   name = exfctest;
1982   common = tests/example_functional_test.c;
1983 };
1984
1985 module = {
1986   name = strtoull_test;
1987   common = tests/strtoull_test.c;
1988 };
1989
1990 module = {
1991   name = setjmp_test;
1992   common = tests/setjmp_test.c;
1993 };
1994
1995 module = {
1996   name = signature_test;
1997   common = tests/signature_test.c;
1998   common = tests/signatures.h;
1999 };
2000
2001 module = {
2002   name = sleep_test;
2003   common = tests/sleep_test.c;
2004 };
2005
2006 module = {
2007   name = xnu_uuid_test;
2008   common = tests/xnu_uuid_test.c;
2009 };
2010
2011 module = {
2012   name = pbkdf2_test;
2013   common = tests/pbkdf2_test.c;
2014 };
2015
2016 module = {
2017   name = legacy_password_test;
2018   common = tests/legacy_password_test.c;
2019   enable = i386_pc;
2020   enable = i386_efi;
2021   enable = x86_64_efi;
2022   enable = emu;
2023   enable = xen;
2024 };
2025
2026 module = {
2027   name = div;
2028   common = lib/division.c;
2029   enable = no_softdiv;
2030 };
2031
2032 module = {
2033   name = div_test;
2034   common = tests/div_test.c;
2035 };
2036
2037 module = {
2038   name = mul_test;
2039   common = tests/mul_test.c;
2040 };
2041
2042 module = {
2043   name = shift_test;
2044   common = tests/shift_test.c;
2045 };
2046
2047 module = {
2048   name = cmp_test;
2049   common = tests/cmp_test.c;
2050 };
2051
2052 module = {
2053   name = ctz_test;
2054   common = tests/ctz_test.c;
2055 };
2056
2057 module = {
2058   name = bswap_test;
2059   common = tests/bswap_test.c;
2060 };
2061
2062 module = {
2063   name = videotest_checksum;
2064   common = tests/videotest_checksum.c;
2065 };
2066
2067 module = {
2068   name = gfxterm_menu;
2069   common = tests/gfxterm_menu.c;
2070 };
2071
2072 module = {
2073   name = cmdline_cat_test;
2074   common = tests/cmdline_cat_test.c;
2075 };
2076
2077 module = {
2078   name = bitmap;
2079   common = video/bitmap.c;
2080 };
2081
2082 module = {
2083   name = bitmap_scale;
2084   common = video/bitmap_scale.c;
2085 };
2086
2087 module = {
2088   name = efi_gop;
2089   efi = video/efi_gop.c;
2090   enable = efi;
2091 };
2092
2093 module = {
2094   name = efi_uga;
2095   efi = video/efi_uga.c;
2096   enable = i386_efi;
2097   enable = x86_64_efi;
2098 };
2099
2100 module = {
2101   name = jpeg;
2102   common = video/readers/jpeg.c;
2103 };
2104
2105 module = {
2106   name = png;
2107   common = video/readers/png.c;
2108 };
2109
2110 module = {
2111   name = tga;
2112   common = video/readers/tga.c;
2113 };
2114
2115 module = {
2116   name = vbe;
2117   common = video/i386/pc/vbe.c;
2118   enable = i386_pc;
2119 };
2120
2121 module = {
2122   name = video_fb;
2123   common = video/fb/video_fb.c;
2124   common = video/fb/fbblit.c;
2125   common = video/fb/fbfill.c;
2126   common = video/fb/fbutil.c;
2127   enable = videomodules;
2128 };
2129
2130 module = {
2131   name = video;
2132   common = video/video.c;
2133   enable = videomodules;
2134 };
2135
2136 module = {
2137   name = video_colors;
2138   common = video/colors.c;
2139 };
2140
2141 module = {
2142   name = ieee1275_fb;
2143   ieee1275 = video/ieee1275.c;
2144   enable = powerpc_ieee1275;
2145 };
2146
2147 module = {
2148   name = sdl;
2149   emu = video/emu/sdl.c;
2150   enable = emu;
2151   condition = COND_GRUB_EMU_SDL;
2152 };
2153
2154 module = {
2155   name = datehook;
2156   common = hook/datehook.c;
2157 };
2158
2159 module = {
2160   name = net;
2161   common = net/net.c;
2162   common = net/dns.c;
2163   common = net/bootp.c;
2164   common = net/ip.c;
2165   common = net/udp.c;
2166   common = net/tcp.c;
2167   common = net/icmp.c;
2168   common = net/icmp6.c;
2169   common = net/ethernet.c;
2170   common = net/arp.c;
2171   common = net/netbuff.c;
2172 };
2173
2174 module = {
2175   name = tftp;
2176   common = net/tftp.c;
2177 };
2178
2179 module = {
2180   name = http;
2181   common = net/http.c;
2182 };
2183
2184 module = {
2185   name = ofnet;
2186   common = net/drivers/ieee1275/ofnet.c;
2187   enable = ieee1275;
2188 };
2189
2190 module = {
2191   name = ubootnet;
2192   common = net/drivers/uboot/ubootnet.c;
2193   enable = uboot;
2194 };
2195
2196 module = {
2197   name = efinet;
2198   common = net/drivers/efi/efinet.c;
2199   enable = efi;
2200 };
2201
2202 module = {
2203   name = emunet;
2204   emu = net/drivers/emu/emunet.c;
2205   enable = emu;
2206 };
2207
2208 module = {
2209   name = legacycfg;
2210   common = commands/legacycfg.c;
2211   common = lib/legacy_parse.c;
2212   emu = lib/i386/pc/vesa_modes_table.c;
2213   i386_efi = lib/i386/pc/vesa_modes_table.c;
2214   x86_64_efi = lib/i386/pc/vesa_modes_table.c;
2215   xen = lib/i386/pc/vesa_modes_table.c;
2216
2217   enable = i386_pc;
2218   enable = i386_efi;
2219   enable = x86_64_efi;
2220   enable = emu;
2221   enable = xen;
2222 };
2223
2224 module = {
2225   name = syslinuxcfg;
2226   common = lib/syslinux_parse.c;
2227   common = commands/syslinuxcfg.c;
2228 };
2229
2230 module = {
2231   name = test_blockarg;
2232   common = tests/test_blockarg.c;
2233 };
2234
2235 module = {
2236   name = xzio;
2237   common = io/xzio.c;
2238   common = lib/xzembed/xz_dec_bcj.c;
2239   common = lib/xzembed/xz_dec_lzma2.c;
2240   common = lib/xzembed/xz_dec_stream.c;
2241   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
2242   cflags='-Wno-unreachable-code';
2243 };
2244
2245 module = {
2246   name = lzopio;
2247   common = io/lzopio.c;
2248   common = lib/minilzo/minilzo.c;
2249   cflags = '$(CFLAGS_POSIX) -Wno-undef -Wno-redundant-decls -Wno-error';
2250   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
2251 };
2252
2253 module = {
2254   name = testload;
2255   common = commands/testload.c;
2256 };
2257
2258 module = {
2259   name = backtrace;
2260   x86 = lib/i386/backtrace.c;
2261   i386_xen = lib/i386/backtrace.c;
2262   x86_64_xen = lib/i386/backtrace.c;
2263   common = lib/backtrace.c;
2264   enable = x86;
2265   enable = i386_xen;
2266   enable = x86_64_xen;
2267 };
2268
2269 module = {
2270   name = lsapm;
2271   common = commands/i386/pc/lsapm.c;
2272   enable = i386_pc;
2273 };
2274
2275 module = {
2276   name = keylayouts;
2277   common = commands/keylayouts.c;
2278   enable = x86;
2279 };
2280
2281 module = {
2282   name = priority_queue;
2283   common = lib/priority_queue.c;
2284 };
2285
2286 module = {
2287   name = time;
2288   common = commands/time.c;
2289 };
2290
2291 module = {
2292   name = cacheinfo;
2293   common = commands/cacheinfo.c;
2294   condition = COND_ENABLE_CACHE_STATS;
2295 };
2296
2297 module = {
2298   name = boottime;
2299   common = commands/boottime.c;
2300   condition = COND_ENABLE_BOOT_TIME_STATS;
2301 };
2302
2303 module = {
2304   name = adler32;
2305   common = lib/adler32.c;
2306 };
2307
2308 module = {
2309   name = crc64;
2310   common = lib/crc64.c;
2311 };
2312
2313 module = {
2314   name = mpi;
2315   common = lib/libgcrypt-grub/mpi/mpiutil.c;
2316   common = lib/libgcrypt-grub/mpi/mpi-bit.c;
2317   common = lib/libgcrypt-grub/mpi/mpi-add.c;
2318   common = lib/libgcrypt-grub/mpi/mpi-mul.c;
2319   common = lib/libgcrypt-grub/mpi/mpi-mod.c;
2320   common = lib/libgcrypt-grub/mpi/mpi-gcd.c;
2321   common = lib/libgcrypt-grub/mpi/mpi-div.c;
2322   common = lib/libgcrypt-grub/mpi/mpi-cmp.c;
2323   common = lib/libgcrypt-grub/mpi/mpi-inv.c;
2324   common = lib/libgcrypt-grub/mpi/mpi-pow.c;
2325   common = lib/libgcrypt-grub/mpi/mpi-mpow.c;
2326   common = lib/libgcrypt-grub/mpi/mpih-lshift.c;
2327   common = lib/libgcrypt-grub/mpi/mpih-mul.c;
2328   common = lib/libgcrypt-grub/mpi/mpih-mul1.c;
2329   common = lib/libgcrypt-grub/mpi/mpih-mul2.c;
2330   common = lib/libgcrypt-grub/mpi/mpih-mul3.c;
2331   common = lib/libgcrypt-grub/mpi/mpih-add1.c;
2332   common = lib/libgcrypt-grub/mpi/mpih-sub1.c;
2333   common = lib/libgcrypt-grub/mpi/mpih-div.c;
2334   common = lib/libgcrypt-grub/mpi/mpicoder.c;
2335   common = lib/libgcrypt-grub/mpi/mpih-rshift.c;
2336   common = lib/libgcrypt-grub/mpi/mpi-inline.c;
2337   common = lib/libgcrypt_wrap/mem.c;
2338
2339   cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
2340   cppflags = '$(CPPFLAGS_GCRY)';
2341 };
2342
2343 module = {
2344   name = all_video;
2345   common = lib/fake_module.c;
2346 };
2347
2348 module = {
2349   name = gdb;
2350   common = gdb/cstub.c;
2351   common = gdb/gdb.c;
2352   i386 = gdb/i386/idt.c;
2353   i386 = gdb/i386/machdep.S;
2354   i386 = gdb/i386/signal.c;
2355   enable = i386;
2356 };
2357
2358 module = {
2359   name = testspeed;
2360   common = commands/testspeed.c;
2361 };
2362
2363 module = {
2364   name = tr;
2365   common = commands/tr.c;
2366 };
2367
2368 module = {
2369   name = progress;
2370   common = lib/progress.c;
2371 };
2372
2373 module = {
2374   name = file;
2375   common = commands/file.c;
2376   common = commands/file32.c;
2377   common = commands/file64.c;
2378   extra_dist = commands/fileXX.c;
2379   common = loader/i386/xen_file.c;
2380   common = loader/i386/xen_file32.c;
2381   common = loader/i386/xen_file64.c;
2382   extra_dist = loader/i386/xen_fileXX.c;
2383 };