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