Fix symbols appearing in several modules in linux*.
[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 = 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   common = lib/cmdline.c;
774   i386_pc = lib/i386/pc/biosnum.c;
775   enable = x86;
776   enable = emu;
777   enable = sparc64_ieee1275;
778   enable = powerpc_ieee1275;
779   enable = mips_arc;
780   enable = ia64_efi;
781   enable = arm_efi;
782   enable = arm64_efi;
783   enable = arm_uboot;
784   enable = arm_coreboot;
785 };
786
787 module = {
788   name = cat;
789   common = commands/cat.c;
790 };
791
792 module = {
793   name = cmp;
794   common = commands/cmp.c;
795 };
796
797 module = {
798   name = configfile;
799   common = commands/configfile.c;
800 };
801
802 module = {
803   name = cpuid;
804   common = commands/i386/cpuid.c;
805   enable = x86;
806   enable = i386_xen;
807   enable = x86_64_xen;
808 };
809
810 module = {
811   name = date;
812   common = commands/date.c;
813 };
814
815 module = {
816   name = drivemap;
817
818   i386_pc = commands/i386/pc/drivemap.c;
819   i386_pc = commands/i386/pc/drivemap_int13h.S;
820   enable = i386_pc;
821 };
822
823 module = {
824   name = echo;
825   common = commands/echo.c;
826 };
827
828 module = {
829   name = eval;
830   common = commands/eval.c;
831 };
832
833 module = {
834   name = extcmd;
835   common = commands/extcmd.c;
836   common = lib/arg.c;
837   enable = terminfomodule;
838 };
839
840 module = {
841   name = fixvideo;
842   common = commands/efi/fixvideo.c;
843   enable = i386_efi;
844   enable = x86_64_efi;
845 };
846
847 module = {
848   name = gptsync;
849   common = commands/gptsync.c;
850 };
851
852 module = {
853   name = halt;
854   nopc = commands/halt.c;
855   i386_pc = commands/i386/pc/halt.c;
856   i386_pc = commands/acpihalt.c;
857   i386_coreboot = commands/acpihalt.c;
858   i386_multiboot = commands/acpihalt.c;
859   i386_efi = commands/acpihalt.c;
860   x86_64_efi = commands/acpihalt.c;
861   i386_multiboot = lib/i386/halt.c;
862   i386_coreboot = lib/i386/halt.c;
863   i386_qemu = lib/i386/halt.c;
864   xen = lib/xen/halt.c;
865   efi = lib/efi/halt.c;
866   ieee1275 = lib/ieee1275/halt.c;
867   emu = lib/emu/halt.c;
868   uboot = lib/dummy/halt.c;
869   arm_coreboot = lib/dummy/halt.c;
870 };
871
872 module = {
873   name = reboot;
874   i386 = lib/i386/reboot.c;
875   i386 = lib/i386/reboot_trampoline.S;
876   ia64_efi = lib/efi/reboot.c;
877   x86_64_efi = lib/efi/reboot.c;
878   arm_efi = lib/efi/reboot.c;
879   arm64_efi = lib/efi/reboot.c;
880   powerpc_ieee1275 = lib/ieee1275/reboot.c;
881   sparc64_ieee1275 = lib/ieee1275/reboot.c;
882   mips_arc = lib/mips/arc/reboot.c;
883   mips_loongson = lib/mips/loongson/reboot.c;
884   mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
885   xen = lib/xen/reboot.c;
886   uboot = lib/uboot/reboot.c;
887   arm_coreboot = lib/dummy/reboot.c;
888   common = commands/reboot.c;
889 };
890
891 module = {
892   name = hashsum;
893   common = commands/hashsum.c;
894 };
895
896 module = {
897   name = verify;
898   common = commands/verify.c;
899   cflags = '$(CFLAGS_POSIX)';
900   cppflags = '-I$(srcdir)/lib/posix_wrap';
901 };
902
903 module = {
904   name = hdparm;
905   common = commands/hdparm.c;
906   enable = pci;
907   enable = mips_qemu_mips;
908 };
909
910 module = {
911   name = help;
912   common = commands/help.c;
913 };
914
915 module = {
916   name = hexdump;
917   common = commands/hexdump.c;
918   common = lib/hexdump.c;
919 };
920
921 module = {
922   name = keystatus;
923   common = commands/keystatus.c;
924 };
925
926 module = {
927   name = loadbios;
928   common = commands/efi/loadbios.c;
929   enable = i386_efi;
930   enable = x86_64_efi;
931 };
932
933 module = {
934   name = loadenv;
935   common = commands/loadenv.c;
936   common = lib/envblk.c;
937 };
938
939 module = {
940   name = ls;
941   common = commands/ls.c;
942 };
943
944 module = {
945   name = lsmmap;
946   common = commands/lsmmap.c;
947 };
948
949 module = {
950   name = lspci;
951   common = commands/lspci.c;
952
953   enable = pci;
954 };
955
956 module = {
957   name = memrw;
958   common = commands/memrw.c;
959 };
960
961 module = {
962   name = minicmd;
963   common = commands/minicmd.c;
964 };
965
966 module = {
967   name = parttool;
968   common = commands/parttool.c;
969 };
970
971 module = {
972   name = password;
973   common = commands/password.c;
974 };
975
976 module = {
977   name = password_pbkdf2;
978   common = commands/password_pbkdf2.c;
979 };
980
981 module = {
982   name = play;
983   x86 = commands/i386/pc/play.c;
984   enable = x86;
985 };
986
987 module = {
988   name = spkmodem;
989   x86 = term/spkmodem.c;
990   enable = x86;
991 };
992
993 module = {
994   name = morse;
995   x86 = term/morse.c;
996   enable = x86;
997 };
998
999 module = {
1000   name = probe;
1001   common = commands/probe.c;
1002 };
1003
1004 module = {
1005   name = read;
1006   common = commands/read.c;
1007 };
1008
1009 module = {
1010   name = search;
1011   common = commands/search_wrap.c;
1012   extra_dist = commands/search.c;
1013 };
1014
1015 module = {
1016   name = search_fs_file;
1017   common = commands/search_file.c;
1018 };
1019
1020 module = {
1021   name = search_fs_uuid;
1022   common = commands/search_uuid.c;
1023 };
1024
1025 module = {
1026   name = search_label;
1027   common = commands/search_label.c;
1028 };
1029
1030 module = {
1031   name = setpci;
1032   common = commands/setpci.c;
1033   enable = pci;
1034 };
1035
1036 module = {
1037   name = pcidump;
1038   common = commands/pcidump.c;
1039   enable = pci;
1040 };
1041
1042 module = {
1043   name = sleep;
1044   common = commands/sleep.c;
1045 };
1046
1047 module = {
1048   name = suspend;
1049   ieee1275 = commands/ieee1275/suspend.c;
1050   enable = i386_ieee1275;
1051   enable = powerpc_ieee1275;
1052 };
1053
1054 module = {
1055   name = escc;
1056   ieee1275 = term/ieee1275/escc.c;
1057   enable = powerpc_ieee1275;
1058 };
1059
1060 module = {
1061   name = terminal;
1062   common = commands/terminal.c;
1063 };
1064
1065 module = {
1066   name = test;
1067   common = commands/test.c;
1068 };
1069
1070 module = {
1071   name = true;
1072   common = commands/true.c;
1073 };
1074
1075 module = {
1076   name = usbtest;
1077   common = commands/usbtest.c;
1078   enable = usb;
1079 };
1080
1081 module = {
1082   name = videoinfo;
1083   common = commands/videoinfo.c;
1084 };
1085
1086 module = {
1087   name = videotest;
1088   common = commands/videotest.c;
1089 };
1090
1091 module = {
1092   name = xnu_uuid;
1093   common = commands/xnu_uuid.c;
1094 };
1095
1096 module = {
1097   name = dm_nv;
1098   common = disk/dmraid_nvidia.c;
1099 };
1100
1101 module = {
1102   name = loopback;
1103   common = disk/loopback.c;
1104 };
1105
1106 module = {
1107   name = cryptodisk;
1108   common = disk/cryptodisk.c;
1109 };
1110
1111 module = {
1112   name = luks;
1113   common = disk/luks.c;
1114   common = disk/AFSplitter.c;
1115 };
1116
1117 module = {
1118   name = geli;
1119   common = disk/geli.c;
1120 };
1121
1122 module = {
1123   name = lvm;
1124   common = disk/lvm.c;
1125 };
1126
1127 module = {
1128   name = ldm;
1129   common = disk/ldm.c;
1130 };
1131
1132 module = {
1133   name = mdraid09;
1134   common = disk/mdraid_linux.c;
1135 };
1136
1137 module = {
1138   name = mdraid09_be;
1139   common = disk/mdraid_linux_be.c;
1140 };
1141
1142 module = {
1143   name = mdraid1x;
1144   common = disk/mdraid1x_linux.c;
1145 };
1146
1147 module = {
1148   name = diskfilter;
1149   common = disk/diskfilter.c;
1150 };
1151
1152 module = {
1153   name = raid5rec;
1154   common = disk/raid5_recover.c;
1155 };
1156
1157 module = {
1158   name = raid6rec;
1159   common = disk/raid6_recover.c;
1160 };
1161
1162 module = {
1163   name = scsi;
1164   common = disk/scsi.c;
1165 };
1166
1167 module = {
1168   name = memdisk;
1169   common = disk/memdisk.c;
1170 };
1171
1172 module = {
1173   name = ata;
1174   common = disk/ata.c;
1175   enable = pci;
1176   enable = mips_qemu_mips;
1177 };
1178
1179 module = {
1180   name = ahci;
1181   common = disk/ahci.c;
1182   enable = pci;
1183 };
1184
1185 module = {
1186   name = pata;
1187   common = disk/pata.c;
1188   enable = pci;
1189   enable = mips_qemu_mips;
1190 };
1191
1192 module = {
1193   name = biosdisk;
1194   i386_pc = disk/i386/pc/biosdisk.c;
1195   enable = i386_pc;
1196 };
1197
1198 module = {
1199   name = usbms;
1200   common = disk/usbms.c;
1201   enable = usb;
1202 };
1203
1204 module = {
1205   name = nand;
1206   ieee1275 = disk/ieee1275/nand.c;
1207   enable = i386_ieee1275;
1208 };
1209
1210 module = {
1211   name = efiemu;
1212   common = efiemu/main.c;
1213   common = efiemu/i386/loadcore32.c;
1214   common = efiemu/i386/loadcore64.c;
1215   i386_pc = efiemu/i386/pc/cfgtables.c;
1216   i386_coreboot = efiemu/i386/pc/cfgtables.c;
1217   i386_multiboot = efiemu/i386/pc/cfgtables.c;
1218   i386_ieee1275 = efiemu/i386/nocfgtables.c;
1219   i386_qemu = efiemu/i386/nocfgtables.c;
1220   common = efiemu/mm.c;
1221   common = efiemu/loadcore_common.c;
1222   common = efiemu/symbols.c;
1223   common = efiemu/loadcore32.c;
1224   common = efiemu/loadcore64.c;
1225   common = efiemu/prepare32.c;
1226   common = efiemu/prepare64.c;
1227   common = efiemu/pnvram.c;
1228   common = efiemu/i386/coredetect.c;
1229
1230   extra_dist = efiemu/prepare.c;
1231   extra_dist = efiemu/loadcore.c;
1232   extra_dist = efiemu/runtime/efiemu.S;
1233   extra_dist = efiemu/runtime/efiemu.c;
1234
1235   enable = i386_pc;
1236   enable = i386_coreboot;
1237   enable = i386_ieee1275;
1238   enable = i386_multiboot;
1239   enable = i386_qemu;
1240 };
1241
1242 module = {
1243   name = font;
1244   common = font/font.c;
1245   common = font/font_cmd.c;
1246   enable = videomodules;
1247 };
1248
1249 module = {
1250   name = procfs;
1251   common = fs/proc.c;
1252 };
1253
1254 module = {
1255   name = affs;
1256   common = fs/affs.c;
1257 };
1258
1259 module = {
1260   name = afs;
1261   common = fs/afs.c;
1262 };
1263
1264 module = {
1265   name = bfs;
1266   common = fs/bfs.c;
1267 };
1268
1269 module = {
1270   name = btrfs;
1271   common = fs/btrfs.c;
1272   common = lib/crc.c;
1273   cflags = '$(CFLAGS_POSIX) -Wno-undef';
1274   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
1275 };
1276
1277 module = {
1278   name = archelp;
1279   common = fs/archelp.c;
1280 };
1281
1282 module = {
1283   name = cbfs;
1284   common = fs/cbfs.c;
1285 };
1286
1287 module = {
1288   name = cpio;
1289   common = fs/cpio.c;
1290 };
1291
1292 module = {
1293   name = cpio_be;
1294   common = fs/cpio_be.c;
1295 };
1296
1297 module = {
1298   name = newc;
1299   common = fs/newc.c;
1300 };
1301
1302 module = {
1303   name = odc;
1304   common = fs/odc.c;
1305 };
1306
1307 module = {
1308   name = ext2;
1309   common = fs/ext2.c;
1310 };
1311
1312 module = {
1313   name = fat;
1314   common = fs/fat.c;
1315 };
1316
1317 module = {
1318   name = exfat;
1319   common = fs/exfat.c;
1320 };
1321
1322 module = {
1323   name = fshelp;
1324   common = fs/fshelp.c;
1325 };
1326
1327 module = {
1328   name = hfs;
1329   common = fs/hfs.c;
1330 };
1331
1332 module = {
1333   name = hfsplus;
1334   common = fs/hfsplus.c;
1335 };
1336
1337 module = {
1338   name = hfspluscomp;
1339   common = fs/hfspluscomp.c;
1340 };
1341
1342 module = {
1343   name = iso9660;
1344   common = fs/iso9660.c;
1345 };
1346
1347 module = {
1348   name = jfs;
1349   common = fs/jfs.c;
1350 };
1351
1352 module = {
1353   name = minix;
1354   common = fs/minix.c;
1355 };
1356
1357 module = {
1358   name = minix2;
1359   common = fs/minix2.c;
1360 };
1361
1362 module = {
1363   name = minix3;
1364   common = fs/minix3.c;
1365 };
1366
1367 module = {
1368   name = minix_be;
1369   common = fs/minix_be.c;
1370 };
1371
1372 module = {
1373   name = minix2_be;
1374   common = fs/minix2_be.c;
1375 };
1376
1377 module = {
1378   name = minix3_be;
1379   common = fs/minix3_be.c;
1380 };
1381
1382 module = {
1383   name = nilfs2;
1384   common = fs/nilfs2.c;
1385 };
1386
1387 module = {
1388   name = ntfs;
1389   common = fs/ntfs.c;
1390 };
1391
1392 module = {
1393   name = ntfscomp;
1394   common = fs/ntfscomp.c;
1395 };
1396
1397 module = {
1398   name = reiserfs;
1399   common = fs/reiserfs.c;
1400 };
1401
1402 module = {
1403   name = romfs;
1404   common = fs/romfs.c;
1405 };
1406
1407 module = {
1408   name = sfs;
1409   common = fs/sfs.c;
1410 };
1411
1412 module = {
1413   name = squash4;
1414   common = fs/squash4.c;
1415   cflags = '$(CFLAGS_POSIX) -Wno-undef';
1416   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
1417 };
1418
1419 module = {
1420   name = tar;
1421   common = fs/tar.c;
1422 };
1423
1424 module = {
1425   name = udf;
1426   common = fs/udf.c;
1427 };
1428
1429 module = {
1430   name = ufs1;
1431   common = fs/ufs.c;
1432 };
1433
1434 module = {
1435   name = ufs1_be;
1436   common = fs/ufs_be.c;
1437 };
1438
1439 module = {
1440   name = ufs2;
1441   common = fs/ufs2.c;
1442 };
1443
1444 module = {
1445   name = xfs;
1446   common = fs/xfs.c;
1447 };
1448
1449 module = {
1450   name = zfs;
1451   common = fs/zfs/zfs.c;
1452   common = fs/zfs/zfs_lzjb.c;
1453   common = fs/zfs/zfs_lz4.c;
1454   common = fs/zfs/zfs_sha256.c;
1455   common = fs/zfs/zfs_fletcher.c;
1456 };
1457
1458 module = {
1459   name = zfscrypt;
1460   common = fs/zfs/zfscrypt.c;
1461 };
1462
1463 module = {
1464   name = zfsinfo;
1465   common = fs/zfs/zfsinfo.c;
1466 };
1467
1468 module = {
1469   name = macbless;
1470   common = commands/macbless.c;
1471 };
1472
1473 module = {
1474   name = pxe;
1475   i386_pc = net/drivers/i386/pc/pxe.c;
1476   enable = i386_pc;
1477 };
1478
1479 module = {
1480   name = gettext;
1481   common = gettext/gettext.c;
1482 };
1483
1484 module = {
1485   name = gfxmenu;
1486   common = gfxmenu/gfxmenu.c;
1487   common = gfxmenu/view.c;
1488   common = gfxmenu/font.c;
1489   common = gfxmenu/icon_manager.c;
1490   common = gfxmenu/theme_loader.c;
1491   common = gfxmenu/widget-box.c;
1492   common = gfxmenu/gui_canvas.c;
1493   common = gfxmenu/gui_circular_progress.c;
1494   common = gfxmenu/gui_box.c;
1495   common = gfxmenu/gui_label.c;
1496   common = gfxmenu/gui_list.c;
1497   common = gfxmenu/gui_image.c;
1498   common = gfxmenu/gui_progress_bar.c;
1499   common = gfxmenu/gui_util.c;
1500   common = gfxmenu/gui_string_util.c;
1501 };
1502
1503 module = {
1504   name = hello;
1505   common = hello/hello.c;
1506 };
1507
1508 module = {
1509   name = gzio;
1510   common = io/gzio.c;
1511 };
1512
1513 module = {
1514   name = offsetio;
1515   common = io/offset.c;
1516 };
1517
1518 module = {
1519   name = bufio;
1520   common = io/bufio.c;
1521   enable = videomodules;
1522 };
1523
1524 module = {
1525   name = elf;
1526   common = kern/elf.c;
1527
1528   extra_dist = kern/elfXX.c;
1529 };
1530
1531 module = {
1532   name = crypto;
1533   common = lib/crypto.c;
1534
1535   extra_dist = lib/libgcrypt-grub/cipher/crypto.lst;
1536 };
1537
1538 module = {
1539   name = pbkdf2;
1540   common = lib/pbkdf2.c;
1541 };
1542
1543 module = {
1544   name = relocator;
1545   common = lib/relocator.c;
1546   x86 = lib/i386/relocator16.S;
1547   x86 = lib/i386/relocator32.S;
1548   x86 = lib/i386/relocator64.S;
1549   i386 = lib/i386/relocator_asm.S;
1550   x86_64 = lib/x86_64/relocator_asm.S;
1551   i386_xen = lib/i386/relocator_asm.S;
1552   x86_64_xen = lib/x86_64/relocator_asm.S;
1553   x86 = lib/i386/relocator.c;
1554   x86 = lib/i386/relocator_common_c.c;
1555   ieee1275 = lib/ieee1275/relocator.c;
1556   efi = lib/efi/relocator.c;
1557   mips = lib/mips/relocator_asm.S;
1558   mips = lib/mips/relocator.c;
1559   powerpc = lib/powerpc/relocator_asm.S;
1560   powerpc = lib/powerpc/relocator.c;
1561   xen = lib/xen/relocator.c;
1562   i386_xen = lib/i386/xen/relocator.S;
1563   x86_64_xen = lib/x86_64/xen/relocator.S;
1564   xen = lib/i386/relocator_common_c.c;
1565   x86_64_efi = lib/x86_64/efi/relocator.c;
1566
1567   extra_dist = lib/i386/relocator_common.S;
1568   extra_dist = kern/powerpc/cache_flush.S;
1569
1570   enable = mips;
1571   enable = powerpc;
1572   enable = x86;
1573   enable = xen;
1574 };
1575
1576 module = {
1577   name = datetime;
1578   cmos = lib/cmos_datetime.c;
1579   efi = lib/efi/datetime.c;
1580   uboot = lib/dummy/datetime.c;
1581   arm_coreboot = lib/dummy/datetime.c;
1582   sparc64_ieee1275 = lib/ieee1275/datetime.c;
1583   powerpc_ieee1275 = lib/ieee1275/datetime.c;
1584   sparc64_ieee1275 = lib/ieee1275/cmos.c;
1585   powerpc_ieee1275 = lib/ieee1275/cmos.c;
1586   xen = lib/xen/datetime.c;
1587
1588   mips_arc = lib/arc/datetime.c;
1589   enable = noemu;
1590 };
1591
1592 module = {
1593   name = setjmp;
1594   common = lib/setjmp.S;
1595   extra_dist = lib/i386/setjmp.S;
1596   extra_dist = lib/mips/setjmp.S;
1597   extra_dist = lib/x86_64/setjmp.S;
1598   extra_dist = lib/sparc64/setjmp.S;
1599   extra_dist = lib/powerpc/setjmp.S;
1600   extra_dist = lib/ia64/setjmp.S;
1601   extra_dist = lib/ia64/longjmp.S;
1602   extra_dist = lib/arm/setjmp.S;
1603   extra_dist = lib/arm64/setjmp.S;
1604 };
1605
1606 module = {
1607   name = aout;
1608   common = loader/aout.c;
1609   enable = x86;
1610 };
1611
1612 module = {
1613   name = bsd;
1614   x86 = loader/i386/bsd.c;
1615   x86 = loader/i386/bsd32.c;
1616   x86 = loader/i386/bsd64.c;
1617
1618   extra_dist = loader/i386/bsdXX.c;
1619   extra_dist = loader/i386/bsd_pagetable.c;
1620
1621   enable = x86;
1622 };
1623
1624 module = {
1625   name = plan9;
1626   i386_pc = loader/i386/pc/plan9.c;
1627   enable = i386_pc;
1628 };
1629
1630
1631 module = {
1632   name = linux16;
1633   common = loader/i386/pc/linux.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 = loader/multiboot_mbi2.c;
1669   enable = x86;
1670   enable = mips;
1671 };
1672
1673 module = {
1674   name = multiboot;
1675   common = loader/multiboot.c;
1676   x86 = loader/i386/multiboot_mbi.c;
1677   extra_dist = loader/multiboot_elfxx.c;
1678   enable = x86;
1679 };
1680
1681 module = {
1682   name = xen_boot;
1683   arm64 = loader/arm64/xen_boot.c;
1684   enable = arm64;
1685 };
1686
1687 module = {
1688   name = linux;
1689   x86 = loader/i386/linux.c;
1690   xen = loader/i386/xen.c;
1691   i386_pc = lib/i386/pc/vesa_modes_table.c;
1692   mips = loader/mips/linux.c;
1693   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
1694   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
1695   ia64_efi = loader/ia64/efi/linux.c;
1696   arm = loader/arm/linux.c;
1697   arm64 = loader/arm64/linux.c;
1698   common = loader/linux.c;
1699   enable = noemu;
1700 };
1701
1702 module = {
1703   name = fdt;
1704   arm64 = loader/efi/fdt.c;
1705   common = lib/fdt.c;
1706   enable = fdt;
1707 };
1708
1709 module = {
1710   name = xnu;
1711   x86 = loader/xnu_resume.c;
1712   x86 = loader/i386/xnu.c;
1713   x86 = loader/xnu.c;
1714
1715   /* Code is pretty generic but relies on RNG which
1716      is available only on few platforms. It's not a
1717      big deal as xnu needs ACPI anyway and we have
1718      RNG on all platforms with ACPI.
1719    */
1720   enable = i386_multiboot;
1721   enable = i386_coreboot;
1722   enable = i386_pc;
1723   enable = i386_efi;
1724   enable = x86_64_efi;
1725 };
1726
1727 module = {
1728   name = random;
1729   x86 = lib/i386/random.c;
1730   common = lib/random.c;
1731
1732   i386_multiboot = kern/i386/tsc_pmtimer.c;
1733   i386_coreboot = kern/i386/tsc_pmtimer.c;
1734   i386_pc = kern/i386/tsc_pmtimer.c;
1735
1736   enable = i386_multiboot;
1737   enable = i386_coreboot;
1738   enable = i386_pc;
1739   enable = i386_efi;
1740   enable = x86_64_efi;
1741 };
1742
1743 module = {
1744   name = macho;
1745
1746   common = loader/macho.c;
1747   common = loader/macho32.c;
1748   common = loader/macho64.c;
1749   common = loader/lzss.c;
1750   extra_dist = loader/machoXX.c;
1751 };
1752
1753 module = {
1754   name = appleldr;
1755   common = loader/efi/appleloader.c;
1756   enable = i386_efi;
1757   enable = x86_64_efi;
1758 };
1759
1760 module = {
1761   name = chain;
1762   efi = loader/efi/chainloader.c;
1763   i386_pc = loader/i386/pc/chainloader.c;
1764   i386_coreboot = loader/i386/coreboot/chainloader.c;
1765   i386_coreboot = lib/LzmaDec.c;
1766   enable = i386_pc;
1767   enable = i386_coreboot;
1768   enable = efi;
1769 };
1770
1771 module = {
1772   name = mmap;
1773   common = mmap/mmap.c;
1774   x86 = mmap/i386/uppermem.c;
1775   x86 = mmap/i386/mmap.c;
1776
1777   i386_pc = mmap/i386/pc/mmap.c;
1778   i386_pc = mmap/i386/pc/mmap_helper.S;
1779
1780   efi = mmap/efi/mmap.c;
1781
1782   mips = mmap/mips/uppermem.c;
1783
1784   enable = x86;
1785   enable = ia64_efi;
1786   enable = arm_efi;
1787   enable = arm64_efi;
1788   enable = mips;
1789 };
1790
1791 module = {
1792   name = normal;
1793   common = normal/main.c;
1794   common = normal/cmdline.c;
1795   common = normal/dyncmd.c;
1796   common = normal/auth.c;
1797   common = normal/autofs.c;
1798   common = normal/color.c;
1799   common = normal/completion.c;
1800   common = normal/datetime.c;
1801   common = normal/menu.c;
1802   common = normal/menu_entry.c;
1803   common = normal/menu_text.c;
1804   common = normal/misc.c;
1805   common = normal/crypto.c;
1806   common = normal/term.c;
1807   common = normal/context.c;
1808   common = normal/charset.c;
1809   common = lib/getline.c;
1810
1811   common = script/main.c;
1812   common = script/script.c;
1813   common = script/execute.c;
1814   common = script/function.c;
1815   common = script/lexer.c;
1816   common = script/argv.c;
1817
1818   common = commands/menuentry.c;
1819
1820   common = unidata.c;
1821   common_nodist = grub_script.tab.c;
1822   common_nodist = grub_script.yy.c;
1823   common_nodist = grub_script.tab.h;
1824   common_nodist = grub_script.yy.h;
1825
1826   extra_dist = script/yylex.l;
1827   extra_dist = script/parser.y;
1828
1829   cflags = '$(CFLAGS_POSIX) -Wno-redundant-decls';
1830   cppflags = '$(CPPFLAGS_POSIX)';
1831 };
1832
1833 module = {
1834   name = part_acorn;
1835   common = partmap/acorn.c;
1836 };
1837
1838 module = {
1839   name = part_amiga;
1840   common = partmap/amiga.c;
1841 };
1842
1843 module = {
1844   name = part_apple;
1845   common = partmap/apple.c;
1846 };
1847
1848 module = {
1849   name = part_gpt;
1850   common = partmap/gpt.c;
1851 };
1852
1853 module = {
1854   name = part_msdos;
1855   common = partmap/msdos.c;
1856 };
1857
1858 module = {
1859   name = part_sun;
1860   common = partmap/sun.c;
1861 };
1862
1863 module = {
1864   name = part_plan;
1865   common = partmap/plan.c;
1866 };
1867
1868 module = {
1869   name = part_dvh;
1870   common = partmap/dvh.c;
1871 };
1872
1873 module = {
1874   name = part_bsd;
1875   common = partmap/bsdlabel.c;
1876 };
1877
1878 module = {
1879   name = part_sunpc;
1880   common = partmap/sunpc.c;
1881 };
1882
1883 module = {
1884   name = part_dfly;
1885   common = partmap/dfly.c;
1886 };
1887
1888 module = {
1889   name = msdospart;
1890   common = parttool/msdospart.c;
1891 };
1892
1893 module = {
1894   name = at_keyboard;
1895   common = term/at_keyboard.c;
1896   common = term/ps2.c;
1897   enable = x86;
1898 };
1899
1900 module = {
1901   name = gfxterm;
1902   common = term/gfxterm.c;
1903   enable = videomodules;
1904 };
1905
1906 module = {
1907   name = gfxterm_background;
1908   common = term/gfxterm_background.c;
1909 };
1910
1911 module = {
1912   name = serial;
1913   common = term/serial.c;
1914   x86 = term/ns8250.c;
1915   ieee1275 = term/ieee1275/serial.c;
1916   mips_arc = term/arc/serial.c;
1917   efi = term/efi/serial.c;
1918
1919   enable = terminfomodule;
1920   enable = ieee1275;
1921   enable = mips_arc;
1922 };
1923
1924 module = {
1925   name = sendkey;
1926   i386_pc = commands/i386/pc/sendkey.c;
1927   enable = i386_pc;
1928 };
1929
1930 module = {
1931   name = terminfo;
1932   common = term/terminfo.c;
1933   common = term/tparm.c;
1934   enable = terminfomodule;
1935 };
1936
1937 module = {
1938   name = usb_keyboard;
1939   common = term/usb_keyboard.c;
1940   enable = usb;
1941 };
1942
1943 module = {
1944   name = vga;
1945   common = video/i386/pc/vga.c;
1946   enable = i386_pc;
1947 };
1948
1949 module = {
1950   name = vga_text;
1951   common = term/i386/pc/vga_text.c;
1952   enable = i386_pc;
1953 };
1954
1955 module = {
1956   name = mda_text;
1957   common = term/i386/pc/mda_text.c;
1958   enable = i386_pc;
1959   enable = i386_coreboot_multiboot_qemu;
1960 };
1961
1962 module = {
1963   name = video_cirrus;
1964   x86 = video/cirrus.c;
1965   enable = x86;
1966 };
1967
1968 module = {
1969   name = video_bochs;
1970   x86 = video/bochs.c;
1971   enable = x86;
1972 };
1973
1974 module = {
1975   name = functional_test;
1976   common = tests/lib/functional_test.c;
1977   common = tests/lib/test.c;
1978   common = tests/checksums.h;
1979   common = tests/video_checksum.c;
1980   common = tests/fake_input.c;
1981   common = video/capture.c;
1982 };
1983
1984 module = {
1985   name = exfctest;
1986   common = tests/example_functional_test.c;
1987 };
1988
1989 module = {
1990   name = strtoull_test;
1991   common = tests/strtoull_test.c;
1992 };
1993
1994 module = {
1995   name = setjmp_test;
1996   common = tests/setjmp_test.c;
1997 };
1998
1999 module = {
2000   name = signature_test;
2001   common = tests/signature_test.c;
2002   common = tests/signatures.h;
2003 };
2004
2005 module = {
2006   name = sleep_test;
2007   common = tests/sleep_test.c;
2008 };
2009
2010 module = {
2011   name = xnu_uuid_test;
2012   common = tests/xnu_uuid_test.c;
2013 };
2014
2015 module = {
2016   name = pbkdf2_test;
2017   common = tests/pbkdf2_test.c;
2018 };
2019
2020 module = {
2021   name = legacy_password_test;
2022   common = tests/legacy_password_test.c;
2023   enable = i386_pc;
2024   enable = i386_efi;
2025   enable = x86_64_efi;
2026   enable = emu;
2027   enable = xen;
2028 };
2029
2030 module = {
2031   name = div;
2032   common = lib/division.c;
2033   enable = no_softdiv;
2034 };
2035
2036 module = {
2037   name = div_test;
2038   common = tests/div_test.c;
2039 };
2040
2041 module = {
2042   name = mul_test;
2043   common = tests/mul_test.c;
2044 };
2045
2046 module = {
2047   name = shift_test;
2048   common = tests/shift_test.c;
2049 };
2050
2051 module = {
2052   name = cmp_test;
2053   common = tests/cmp_test.c;
2054 };
2055
2056 module = {
2057   name = ctz_test;
2058   common = tests/ctz_test.c;
2059 };
2060
2061 module = {
2062   name = bswap_test;
2063   common = tests/bswap_test.c;
2064 };
2065
2066 module = {
2067   name = videotest_checksum;
2068   common = tests/videotest_checksum.c;
2069 };
2070
2071 module = {
2072   name = gfxterm_menu;
2073   common = tests/gfxterm_menu.c;
2074 };
2075
2076 module = {
2077   name = cmdline_cat_test;
2078   common = tests/cmdline_cat_test.c;
2079 };
2080
2081 module = {
2082   name = bitmap;
2083   common = video/bitmap.c;
2084 };
2085
2086 module = {
2087   name = bitmap_scale;
2088   common = video/bitmap_scale.c;
2089 };
2090
2091 module = {
2092   name = efi_gop;
2093   efi = video/efi_gop.c;
2094   enable = efi;
2095 };
2096
2097 module = {
2098   name = efi_uga;
2099   efi = video/efi_uga.c;
2100   enable = i386_efi;
2101   enable = x86_64_efi;
2102 };
2103
2104 module = {
2105   name = jpeg;
2106   common = video/readers/jpeg.c;
2107 };
2108
2109 module = {
2110   name = png;
2111   common = video/readers/png.c;
2112 };
2113
2114 module = {
2115   name = tga;
2116   common = video/readers/tga.c;
2117 };
2118
2119 module = {
2120   name = vbe;
2121   common = video/i386/pc/vbe.c;
2122   enable = i386_pc;
2123 };
2124
2125 module = {
2126   name = video_fb;
2127   common = video/fb/video_fb.c;
2128   common = video/fb/fbblit.c;
2129   common = video/fb/fbfill.c;
2130   common = video/fb/fbutil.c;
2131   enable = videomodules;
2132 };
2133
2134 module = {
2135   name = video;
2136   common = video/video.c;
2137   enable = videomodules;
2138 };
2139
2140 module = {
2141   name = video_colors;
2142   common = video/colors.c;
2143 };
2144
2145 module = {
2146   name = ieee1275_fb;
2147   ieee1275 = video/ieee1275.c;
2148   enable = powerpc_ieee1275;
2149 };
2150
2151 module = {
2152   name = sdl;
2153   emu = video/emu/sdl.c;
2154   enable = emu;
2155   condition = COND_GRUB_EMU_SDL;
2156 };
2157
2158 module = {
2159   name = datehook;
2160   common = hook/datehook.c;
2161 };
2162
2163 module = {
2164   name = net;
2165   common = net/net.c;
2166   common = net/dns.c;
2167   common = net/bootp.c;
2168   common = net/ip.c;
2169   common = net/udp.c;
2170   common = net/tcp.c;
2171   common = net/icmp.c;
2172   common = net/icmp6.c;
2173   common = net/ethernet.c;
2174   common = net/arp.c;
2175   common = net/netbuff.c;
2176 };
2177
2178 module = {
2179   name = tftp;
2180   common = net/tftp.c;
2181 };
2182
2183 module = {
2184   name = http;
2185   common = net/http.c;
2186 };
2187
2188 module = {
2189   name = ofnet;
2190   common = net/drivers/ieee1275/ofnet.c;
2191   enable = ieee1275;
2192 };
2193
2194 module = {
2195   name = ubootnet;
2196   common = net/drivers/uboot/ubootnet.c;
2197   enable = uboot;
2198 };
2199
2200 module = {
2201   name = efinet;
2202   common = net/drivers/efi/efinet.c;
2203   enable = efi;
2204 };
2205
2206 module = {
2207   name = emunet;
2208   emu = net/drivers/emu/emunet.c;
2209   enable = emu;
2210 };
2211
2212 module = {
2213   name = legacycfg;
2214   common = commands/legacycfg.c;
2215   common = lib/legacy_parse.c;
2216   emu = lib/i386/pc/vesa_modes_table.c;
2217   i386_efi = lib/i386/pc/vesa_modes_table.c;
2218   x86_64_efi = lib/i386/pc/vesa_modes_table.c;
2219   xen = lib/i386/pc/vesa_modes_table.c;
2220
2221   enable = i386_pc;
2222   enable = i386_efi;
2223   enable = x86_64_efi;
2224   enable = emu;
2225   enable = xen;
2226 };
2227
2228 module = {
2229   name = syslinuxcfg;
2230   common = lib/syslinux_parse.c;
2231   common = commands/syslinuxcfg.c;
2232 };
2233
2234 module = {
2235   name = test_blockarg;
2236   common = tests/test_blockarg.c;
2237 };
2238
2239 module = {
2240   name = xzio;
2241   common = io/xzio.c;
2242   common = lib/xzembed/xz_dec_bcj.c;
2243   common = lib/xzembed/xz_dec_lzma2.c;
2244   common = lib/xzembed/xz_dec_stream.c;
2245   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
2246   cflags='-Wno-unreachable-code';
2247 };
2248
2249 module = {
2250   name = lzopio;
2251   common = io/lzopio.c;
2252   common = lib/minilzo/minilzo.c;
2253   cflags = '$(CFLAGS_POSIX) -Wno-undef -Wno-redundant-decls -Wno-error';
2254   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
2255 };
2256
2257 module = {
2258   name = testload;
2259   common = commands/testload.c;
2260 };
2261
2262 module = {
2263   name = backtrace;
2264   x86 = lib/i386/backtrace.c;
2265   i386_xen = lib/i386/backtrace.c;
2266   x86_64_xen = lib/i386/backtrace.c;
2267   common = lib/backtrace.c;
2268   enable = x86;
2269   enable = i386_xen;
2270   enable = x86_64_xen;
2271 };
2272
2273 module = {
2274   name = lsapm;
2275   common = commands/i386/pc/lsapm.c;
2276   enable = i386_pc;
2277 };
2278
2279 module = {
2280   name = keylayouts;
2281   common = commands/keylayouts.c;
2282   enable = x86;
2283 };
2284
2285 module = {
2286   name = priority_queue;
2287   common = lib/priority_queue.c;
2288 };
2289
2290 module = {
2291   name = time;
2292   common = commands/time.c;
2293 };
2294
2295 module = {
2296   name = cacheinfo;
2297   common = commands/cacheinfo.c;
2298   condition = COND_ENABLE_CACHE_STATS;
2299 };
2300
2301 module = {
2302   name = boottime;
2303   common = commands/boottime.c;
2304   condition = COND_ENABLE_BOOT_TIME_STATS;
2305 };
2306
2307 module = {
2308   name = adler32;
2309   common = lib/adler32.c;
2310 };
2311
2312 module = {
2313   name = crc64;
2314   common = lib/crc64.c;
2315 };
2316
2317 module = {
2318   name = mpi;
2319   common = lib/libgcrypt-grub/mpi/mpiutil.c;
2320   common = lib/libgcrypt-grub/mpi/mpi-bit.c;
2321   common = lib/libgcrypt-grub/mpi/mpi-add.c;
2322   common = lib/libgcrypt-grub/mpi/mpi-mul.c;
2323   common = lib/libgcrypt-grub/mpi/mpi-mod.c;
2324   common = lib/libgcrypt-grub/mpi/mpi-gcd.c;
2325   common = lib/libgcrypt-grub/mpi/mpi-div.c;
2326   common = lib/libgcrypt-grub/mpi/mpi-cmp.c;
2327   common = lib/libgcrypt-grub/mpi/mpi-inv.c;
2328   common = lib/libgcrypt-grub/mpi/mpi-pow.c;
2329   common = lib/libgcrypt-grub/mpi/mpi-mpow.c;
2330   common = lib/libgcrypt-grub/mpi/mpih-lshift.c;
2331   common = lib/libgcrypt-grub/mpi/mpih-mul.c;
2332   common = lib/libgcrypt-grub/mpi/mpih-mul1.c;
2333   common = lib/libgcrypt-grub/mpi/mpih-mul2.c;
2334   common = lib/libgcrypt-grub/mpi/mpih-mul3.c;
2335   common = lib/libgcrypt-grub/mpi/mpih-add1.c;
2336   common = lib/libgcrypt-grub/mpi/mpih-sub1.c;
2337   common = lib/libgcrypt-grub/mpi/mpih-div.c;
2338   common = lib/libgcrypt-grub/mpi/mpicoder.c;
2339   common = lib/libgcrypt-grub/mpi/mpih-rshift.c;
2340   common = lib/libgcrypt-grub/mpi/mpi-inline.c;
2341   common = lib/libgcrypt_wrap/mem.c;
2342
2343   cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
2344   cppflags = '$(CPPFLAGS_GCRY)';
2345 };
2346
2347 module = {
2348   name = all_video;
2349   common = lib/fake_module.c;
2350 };
2351
2352 module = {
2353   name = gdb;
2354   common = gdb/cstub.c;
2355   common = gdb/gdb.c;
2356   i386 = gdb/i386/idt.c;
2357   i386 = gdb/i386/machdep.S;
2358   i386 = gdb/i386/signal.c;
2359   enable = i386;
2360 };
2361
2362 module = {
2363   name = testspeed;
2364   common = commands/testspeed.c;
2365 };
2366
2367 module = {
2368   name = tr;
2369   common = commands/tr.c;
2370 };
2371
2372 module = {
2373   name = progress;
2374   common = lib/progress.c;
2375 };
2376
2377 module = {
2378   name = file;
2379   common = commands/file.c;
2380   common = commands/file32.c;
2381   common = commands/file64.c;
2382   extra_dist = commands/fileXX.c;
2383   common = loader/i386/xen_file.c;
2384   common = loader/i386/xen_file32.c;
2385   common = loader/i386/xen_file64.c;
2386   extra_dist = loader/i386/xen_fileXX.c;
2387 };