Missing parts of previous commit
[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   i386_pc = lib/i386/pc/biosnum.c;
774   enable = x86;
775   enable = emu;
776   enable = sparc64_ieee1275;
777   enable = powerpc_ieee1275;
778   enable = mips_arc;
779   enable = ia64_efi;
780   enable = arm_efi;
781   enable = arm64_efi;
782   enable = arm_uboot;
783   enable = arm_coreboot;
784 };
785
786 module = {
787   name = cat;
788   common = commands/cat.c;
789 };
790
791 module = {
792   name = cmp;
793   common = commands/cmp.c;
794 };
795
796 module = {
797   name = configfile;
798   common = commands/configfile.c;
799 };
800
801 module = {
802   name = cpuid;
803   common = commands/i386/cpuid.c;
804   enable = x86;
805   enable = i386_xen;
806   enable = x86_64_xen;
807 };
808
809 module = {
810   name = date;
811   common = commands/date.c;
812 };
813
814 module = {
815   name = drivemap;
816
817   i386_pc = commands/i386/pc/drivemap.c;
818   i386_pc = commands/i386/pc/drivemap_int13h.S;
819   enable = i386_pc;
820 };
821
822 module = {
823   name = echo;
824   common = commands/echo.c;
825 };
826
827 module = {
828   name = eval;
829   common = commands/eval.c;
830 };
831
832 module = {
833   name = extcmd;
834   common = commands/extcmd.c;
835   common = lib/arg.c;
836   enable = terminfomodule;
837 };
838
839 module = {
840   name = fixvideo;
841   common = commands/efi/fixvideo.c;
842   enable = i386_efi;
843   enable = x86_64_efi;
844 };
845
846 module = {
847   name = gptsync;
848   common = commands/gptsync.c;
849 };
850
851 module = {
852   name = halt;
853   nopc = commands/halt.c;
854   i386_pc = commands/i386/pc/halt.c;
855   i386_pc = commands/acpihalt.c;
856   i386_coreboot = commands/acpihalt.c;
857   i386_multiboot = commands/acpihalt.c;
858   i386_efi = commands/acpihalt.c;
859   x86_64_efi = commands/acpihalt.c;
860   i386_multiboot = lib/i386/halt.c;
861   i386_coreboot = lib/i386/halt.c;
862   i386_qemu = lib/i386/halt.c;
863   xen = lib/xen/halt.c;
864   efi = lib/efi/halt.c;
865   ieee1275 = lib/ieee1275/halt.c;
866   emu = lib/emu/halt.c;
867   uboot = lib/dummy/halt.c;
868   arm_coreboot = lib/dummy/halt.c;
869 };
870
871 module = {
872   name = reboot;
873   i386 = lib/i386/reboot.c;
874   i386 = lib/i386/reboot_trampoline.S;
875   ia64_efi = lib/efi/reboot.c;
876   x86_64_efi = lib/efi/reboot.c;
877   arm_efi = lib/efi/reboot.c;
878   arm64_efi = lib/efi/reboot.c;
879   powerpc_ieee1275 = lib/ieee1275/reboot.c;
880   sparc64_ieee1275 = lib/ieee1275/reboot.c;
881   mips_arc = lib/mips/arc/reboot.c;
882   mips_loongson = lib/mips/loongson/reboot.c;
883   mips_qemu_mips = lib/mips/qemu_mips/reboot.c;
884   xen = lib/xen/reboot.c;
885   uboot = lib/uboot/reboot.c;
886   arm_coreboot = lib/dummy/reboot.c;
887   common = commands/reboot.c;
888 };
889
890 module = {
891   name = hashsum;
892   common = commands/hashsum.c;
893 };
894
895 module = {
896   name = verify;
897   common = commands/verify.c;
898   cflags = '$(CFLAGS_POSIX)';
899   cppflags = '-I$(srcdir)/lib/posix_wrap';
900 };
901
902 module = {
903   name = hdparm;
904   common = commands/hdparm.c;
905   common = lib/hexdump.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   common = loader/linux.c;
1635   common = lib/cmdline.c;
1636   enable = x86;
1637 };
1638
1639 module = {
1640   name = ntldr;
1641   i386_pc = loader/i386/pc/ntldr.c;
1642   enable = i386_pc;
1643 };
1644
1645
1646 module = {
1647   name = truecrypt;
1648   i386_pc = loader/i386/pc/truecrypt.c;
1649   enable = i386_pc;
1650 };
1651
1652
1653 module = {
1654   name = freedos;
1655   i386_pc = loader/i386/pc/freedos.c;
1656   enable = i386_pc;
1657 };
1658
1659 module = {
1660   name = pxechain;
1661   i386_pc = loader/i386/pc/pxechainloader.c;
1662   enable = i386_pc;
1663 };
1664
1665 module = {
1666   name = multiboot2;
1667   cppflags = "-DGRUB_USE_MULTIBOOT2";
1668
1669   common = loader/multiboot.c;
1670   common = lib/cmdline.c;
1671   common = loader/multiboot_mbi2.c;
1672   enable = x86;
1673   enable = mips;
1674 };
1675
1676 module = {
1677   name = multiboot;
1678   common = loader/multiboot.c;
1679   common = lib/cmdline.c;
1680   x86 = loader/i386/multiboot_mbi.c;
1681   extra_dist = loader/multiboot_elfxx.c;
1682   enable = x86;
1683 };
1684
1685 module = {
1686   name = xen_boot;
1687   common = lib/cmdline.c;
1688   arm64 = loader/arm64/xen_boot.c;
1689   enable = arm64;
1690 };
1691
1692 module = {
1693   name = linux;
1694   x86 = loader/i386/linux.c;
1695   xen = loader/i386/xen.c;
1696   i386_pc = lib/i386/pc/vesa_modes_table.c;
1697   mips = loader/mips/linux.c;
1698   powerpc_ieee1275 = loader/powerpc/ieee1275/linux.c;
1699   sparc64_ieee1275 = loader/sparc64/ieee1275/linux.c;
1700   ia64_efi = loader/ia64/efi/linux.c;
1701   arm = loader/arm/linux.c;
1702   arm64 = loader/arm64/linux.c;
1703   common = loader/linux.c;
1704   common = lib/cmdline.c;
1705   enable = noemu;
1706 };
1707
1708 module = {
1709   name = fdt;
1710   arm64 = loader/arm64/fdt.c;
1711   common = lib/fdt.c;
1712   enable = fdt;
1713 };
1714
1715 module = {
1716   name = xnu;
1717   x86 = loader/xnu_resume.c;
1718   x86 = loader/i386/xnu.c;
1719   x86 = loader/xnu.c;
1720
1721   /* Code is pretty generic but relies on RNG which
1722      is available only on few platforms. It's not a
1723      big deal as xnu needs ACPI anyway and we have
1724      RNG on all platforms with ACPI.
1725    */
1726   enable = i386_multiboot;
1727   enable = i386_coreboot;
1728   enable = i386_pc;
1729   enable = i386_efi;
1730   enable = x86_64_efi;
1731 };
1732
1733 module = {
1734   name = random;
1735   x86 = lib/i386/random.c;
1736   common = lib/random.c;
1737
1738   i386_multiboot = kern/i386/tsc_pmtimer.c;
1739   i386_coreboot = kern/i386/tsc_pmtimer.c;
1740   i386_pc = kern/i386/tsc_pmtimer.c;
1741
1742   enable = i386_multiboot;
1743   enable = i386_coreboot;
1744   enable = i386_pc;
1745   enable = i386_efi;
1746   enable = x86_64_efi;
1747 };
1748
1749 module = {
1750   name = macho;
1751
1752   common = loader/macho.c;
1753   common = loader/macho32.c;
1754   common = loader/macho64.c;
1755   common = loader/lzss.c;
1756   extra_dist = loader/machoXX.c;
1757 };
1758
1759 module = {
1760   name = appleldr;
1761   common = loader/efi/appleloader.c;
1762   enable = i386_efi;
1763   enable = x86_64_efi;
1764 };
1765
1766 module = {
1767   name = chain;
1768   efi = loader/efi/chainloader.c;
1769   i386_pc = loader/i386/pc/chainloader.c;
1770   i386_coreboot = loader/i386/coreboot/chainloader.c;
1771   i386_coreboot = lib/LzmaDec.c;
1772   enable = i386_pc;
1773   enable = i386_coreboot;
1774   enable = efi;
1775 };
1776
1777 module = {
1778   name = mmap;
1779   common = mmap/mmap.c;
1780   x86 = mmap/i386/uppermem.c;
1781   x86 = mmap/i386/mmap.c;
1782
1783   i386_pc = mmap/i386/pc/mmap.c;
1784   i386_pc = mmap/i386/pc/mmap_helper.S;
1785
1786   efi = mmap/efi/mmap.c;
1787
1788   mips = mmap/mips/uppermem.c;
1789
1790   enable = x86;
1791   enable = ia64_efi;
1792   enable = arm_efi;
1793   enable = arm64_efi;
1794   enable = mips;
1795 };
1796
1797 module = {
1798   name = normal;
1799   common = normal/main.c;
1800   common = normal/cmdline.c;
1801   common = normal/dyncmd.c;
1802   common = normal/auth.c;
1803   common = normal/autofs.c;
1804   common = normal/color.c;
1805   common = normal/completion.c;
1806   common = normal/datetime.c;
1807   common = normal/menu.c;
1808   common = normal/menu_entry.c;
1809   common = normal/menu_text.c;
1810   common = normal/misc.c;
1811   common = normal/crypto.c;
1812   common = normal/term.c;
1813   common = normal/context.c;
1814   common = normal/charset.c;
1815   common = lib/getline.c;
1816
1817   common = script/main.c;
1818   common = script/script.c;
1819   common = script/execute.c;
1820   common = script/function.c;
1821   common = script/lexer.c;
1822   common = script/argv.c;
1823
1824   common = commands/menuentry.c;
1825
1826   common = unidata.c;
1827   common_nodist = grub_script.tab.c;
1828   common_nodist = grub_script.yy.c;
1829   common_nodist = grub_script.tab.h;
1830   common_nodist = grub_script.yy.h;
1831
1832   extra_dist = script/yylex.l;
1833   extra_dist = script/parser.y;
1834
1835   cflags = '$(CFLAGS_POSIX) -Wno-redundant-decls';
1836   cppflags = '$(CPPFLAGS_POSIX)';
1837 };
1838
1839 module = {
1840   name = part_acorn;
1841   common = partmap/acorn.c;
1842 };
1843
1844 module = {
1845   name = part_amiga;
1846   common = partmap/amiga.c;
1847 };
1848
1849 module = {
1850   name = part_apple;
1851   common = partmap/apple.c;
1852 };
1853
1854 module = {
1855   name = part_gpt;
1856   common = partmap/gpt.c;
1857 };
1858
1859 module = {
1860   name = part_msdos;
1861   common = partmap/msdos.c;
1862 };
1863
1864 module = {
1865   name = part_sun;
1866   common = partmap/sun.c;
1867 };
1868
1869 module = {
1870   name = part_plan;
1871   common = partmap/plan.c;
1872 };
1873
1874 module = {
1875   name = part_dvh;
1876   common = partmap/dvh.c;
1877 };
1878
1879 module = {
1880   name = part_bsd;
1881   common = partmap/bsdlabel.c;
1882 };
1883
1884 module = {
1885   name = part_sunpc;
1886   common = partmap/sunpc.c;
1887 };
1888
1889 module = {
1890   name = part_dfly;
1891   common = partmap/dfly.c;
1892 };
1893
1894 module = {
1895   name = msdospart;
1896   common = parttool/msdospart.c;
1897 };
1898
1899 module = {
1900   name = at_keyboard;
1901   common = term/at_keyboard.c;
1902   common = term/ps2.c;
1903   enable = x86;
1904 };
1905
1906 module = {
1907   name = gfxterm;
1908   common = term/gfxterm.c;
1909   enable = videomodules;
1910 };
1911
1912 module = {
1913   name = gfxterm_background;
1914   common = term/gfxterm_background.c;
1915 };
1916
1917 module = {
1918   name = serial;
1919   common = term/serial.c;
1920   x86 = term/ns8250.c;
1921   ieee1275 = term/ieee1275/serial.c;
1922   mips_arc = term/arc/serial.c;
1923   efi = term/efi/serial.c;
1924
1925   enable = terminfomodule;
1926   enable = ieee1275;
1927   enable = mips_arc;
1928 };
1929
1930 module = {
1931   name = sendkey;
1932   i386_pc = commands/i386/pc/sendkey.c;
1933   enable = i386_pc;
1934 };
1935
1936 module = {
1937   name = terminfo;
1938   common = term/terminfo.c;
1939   common = term/tparm.c;
1940   enable = terminfomodule;
1941 };
1942
1943 module = {
1944   name = usb_keyboard;
1945   common = term/usb_keyboard.c;
1946   enable = usb;
1947 };
1948
1949 module = {
1950   name = vga;
1951   common = video/i386/pc/vga.c;
1952   enable = i386_pc;
1953 };
1954
1955 module = {
1956   name = vga_text;
1957   common = term/i386/pc/vga_text.c;
1958   enable = i386_pc;
1959 };
1960
1961 module = {
1962   name = mda_text;
1963   common = term/i386/pc/mda_text.c;
1964   enable = i386_pc;
1965   enable = i386_coreboot_multiboot_qemu;
1966 };
1967
1968 module = {
1969   name = video_cirrus;
1970   x86 = video/cirrus.c;
1971   enable = x86;
1972 };
1973
1974 module = {
1975   name = video_bochs;
1976   x86 = video/bochs.c;
1977   enable = x86;
1978 };
1979
1980 module = {
1981   name = functional_test;
1982   common = tests/lib/functional_test.c;
1983   common = tests/lib/test.c;
1984   common = tests/checksums.h;
1985   common = tests/video_checksum.c;
1986   common = tests/fake_input.c;
1987   common = video/capture.c;
1988 };
1989
1990 module = {
1991   name = exfctest;
1992   common = tests/example_functional_test.c;
1993 };
1994
1995 module = {
1996   name = strtoull_test;
1997   common = tests/strtoull_test.c;
1998 };
1999
2000 module = {
2001   name = setjmp_test;
2002   common = tests/setjmp_test.c;
2003 };
2004
2005 module = {
2006   name = signature_test;
2007   common = tests/signature_test.c;
2008   common = tests/signatures.h;
2009 };
2010
2011 module = {
2012   name = sleep_test;
2013   common = tests/sleep_test.c;
2014 };
2015
2016 module = {
2017   name = xnu_uuid_test;
2018   common = tests/xnu_uuid_test.c;
2019 };
2020
2021 module = {
2022   name = pbkdf2_test;
2023   common = tests/pbkdf2_test.c;
2024 };
2025
2026 module = {
2027   name = legacy_password_test;
2028   common = tests/legacy_password_test.c;
2029   enable = i386_pc;
2030   enable = i386_efi;
2031   enable = x86_64_efi;
2032   enable = emu;
2033   enable = xen;
2034 };
2035
2036 module = {
2037   name = div;
2038   common = lib/division.c;
2039   enable = no_softdiv;
2040 };
2041
2042 module = {
2043   name = div_test;
2044   common = tests/div_test.c;
2045 };
2046
2047 module = {
2048   name = mul_test;
2049   common = tests/mul_test.c;
2050 };
2051
2052 module = {
2053   name = shift_test;
2054   common = tests/shift_test.c;
2055 };
2056
2057 module = {
2058   name = cmp_test;
2059   common = tests/cmp_test.c;
2060 };
2061
2062 module = {
2063   name = ctz_test;
2064   common = tests/ctz_test.c;
2065 };
2066
2067 module = {
2068   name = bswap_test;
2069   common = tests/bswap_test.c;
2070 };
2071
2072 module = {
2073   name = videotest_checksum;
2074   common = tests/videotest_checksum.c;
2075 };
2076
2077 module = {
2078   name = gfxterm_menu;
2079   common = tests/gfxterm_menu.c;
2080 };
2081
2082 module = {
2083   name = cmdline_cat_test;
2084   common = tests/cmdline_cat_test.c;
2085 };
2086
2087 module = {
2088   name = bitmap;
2089   common = video/bitmap.c;
2090 };
2091
2092 module = {
2093   name = bitmap_scale;
2094   common = video/bitmap_scale.c;
2095 };
2096
2097 module = {
2098   name = efi_gop;
2099   efi = video/efi_gop.c;
2100   enable = efi;
2101 };
2102
2103 module = {
2104   name = efi_uga;
2105   efi = video/efi_uga.c;
2106   enable = i386_efi;
2107   enable = x86_64_efi;
2108 };
2109
2110 module = {
2111   name = jpeg;
2112   common = video/readers/jpeg.c;
2113 };
2114
2115 module = {
2116   name = png;
2117   common = video/readers/png.c;
2118 };
2119
2120 module = {
2121   name = tga;
2122   common = video/readers/tga.c;
2123 };
2124
2125 module = {
2126   name = vbe;
2127   common = video/i386/pc/vbe.c;
2128   enable = i386_pc;
2129 };
2130
2131 module = {
2132   name = video_fb;
2133   common = video/fb/video_fb.c;
2134   common = video/fb/fbblit.c;
2135   common = video/fb/fbfill.c;
2136   common = video/fb/fbutil.c;
2137   enable = videomodules;
2138 };
2139
2140 module = {
2141   name = video;
2142   common = video/video.c;
2143   enable = videomodules;
2144 };
2145
2146 module = {
2147   name = video_colors;
2148   common = video/colors.c;
2149 };
2150
2151 module = {
2152   name = ieee1275_fb;
2153   ieee1275 = video/ieee1275.c;
2154   enable = powerpc_ieee1275;
2155 };
2156
2157 module = {
2158   name = sdl;
2159   emu = video/emu/sdl.c;
2160   enable = emu;
2161   condition = COND_GRUB_EMU_SDL;
2162 };
2163
2164 module = {
2165   name = datehook;
2166   common = hook/datehook.c;
2167 };
2168
2169 module = {
2170   name = net;
2171   common = net/net.c;
2172   common = net/dns.c;
2173   common = net/bootp.c;
2174   common = net/ip.c;
2175   common = net/udp.c;
2176   common = net/tcp.c;
2177   common = net/icmp.c;
2178   common = net/icmp6.c;
2179   common = net/ethernet.c;
2180   common = net/arp.c;
2181   common = net/netbuff.c;
2182 };
2183
2184 module = {
2185   name = tftp;
2186   common = net/tftp.c;
2187 };
2188
2189 module = {
2190   name = http;
2191   common = net/http.c;
2192 };
2193
2194 module = {
2195   name = ofnet;
2196   common = net/drivers/ieee1275/ofnet.c;
2197   enable = ieee1275;
2198 };
2199
2200 module = {
2201   name = ubootnet;
2202   common = net/drivers/uboot/ubootnet.c;
2203   enable = uboot;
2204 };
2205
2206 module = {
2207   name = efinet;
2208   common = net/drivers/efi/efinet.c;
2209   enable = efi;
2210 };
2211
2212 module = {
2213   name = emunet;
2214   emu = net/drivers/emu/emunet.c;
2215   enable = emu;
2216 };
2217
2218 module = {
2219   name = legacycfg;
2220   common = commands/legacycfg.c;
2221   common = lib/legacy_parse.c;
2222   emu = lib/i386/pc/vesa_modes_table.c;
2223   i386_efi = lib/i386/pc/vesa_modes_table.c;
2224   x86_64_efi = lib/i386/pc/vesa_modes_table.c;
2225   xen = lib/i386/pc/vesa_modes_table.c;
2226
2227   enable = i386_pc;
2228   enable = i386_efi;
2229   enable = x86_64_efi;
2230   enable = emu;
2231   enable = xen;
2232 };
2233
2234 module = {
2235   name = syslinuxcfg;
2236   common = lib/syslinux_parse.c;
2237   common = commands/syslinuxcfg.c;
2238 };
2239
2240 module = {
2241   name = test_blockarg;
2242   common = tests/test_blockarg.c;
2243 };
2244
2245 module = {
2246   name = xzio;
2247   common = io/xzio.c;
2248   common = lib/xzembed/xz_dec_bcj.c;
2249   common = lib/xzembed/xz_dec_lzma2.c;
2250   common = lib/xzembed/xz_dec_stream.c;
2251   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed';
2252   cflags='-Wno-unreachable-code';
2253 };
2254
2255 module = {
2256   name = lzopio;
2257   common = io/lzopio.c;
2258   common = lib/minilzo/minilzo.c;
2259   cflags = '$(CFLAGS_POSIX) -Wno-undef -Wno-redundant-decls -Wno-error';
2260   cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
2261 };
2262
2263 module = {
2264   name = testload;
2265   common = commands/testload.c;
2266 };
2267
2268 module = {
2269   name = backtrace;
2270   x86 = lib/i386/backtrace.c;
2271   i386_xen = lib/i386/backtrace.c;
2272   x86_64_xen = lib/i386/backtrace.c;
2273   common = lib/backtrace.c;
2274   enable = x86;
2275   enable = i386_xen;
2276   enable = x86_64_xen;
2277 };
2278
2279 module = {
2280   name = lsapm;
2281   common = commands/i386/pc/lsapm.c;
2282   enable = i386_pc;
2283 };
2284
2285 module = {
2286   name = keylayouts;
2287   common = commands/keylayouts.c;
2288   enable = x86;
2289 };
2290
2291 module = {
2292   name = priority_queue;
2293   common = lib/priority_queue.c;
2294 };
2295
2296 module = {
2297   name = time;
2298   common = commands/time.c;
2299 };
2300
2301 module = {
2302   name = cacheinfo;
2303   common = commands/cacheinfo.c;
2304   condition = COND_ENABLE_CACHE_STATS;
2305 };
2306
2307 module = {
2308   name = boottime;
2309   common = commands/boottime.c;
2310   condition = COND_ENABLE_BOOT_TIME_STATS;
2311 };
2312
2313 module = {
2314   name = adler32;
2315   common = lib/adler32.c;
2316 };
2317
2318 module = {
2319   name = crc64;
2320   common = lib/crc64.c;
2321 };
2322
2323 module = {
2324   name = mpi;
2325   common = lib/libgcrypt-grub/mpi/mpiutil.c;
2326   common = lib/libgcrypt-grub/mpi/mpi-bit.c;
2327   common = lib/libgcrypt-grub/mpi/mpi-add.c;
2328   common = lib/libgcrypt-grub/mpi/mpi-mul.c;
2329   common = lib/libgcrypt-grub/mpi/mpi-mod.c;
2330   common = lib/libgcrypt-grub/mpi/mpi-gcd.c;
2331   common = lib/libgcrypt-grub/mpi/mpi-div.c;
2332   common = lib/libgcrypt-grub/mpi/mpi-cmp.c;
2333   common = lib/libgcrypt-grub/mpi/mpi-inv.c;
2334   common = lib/libgcrypt-grub/mpi/mpi-pow.c;
2335   common = lib/libgcrypt-grub/mpi/mpi-mpow.c;
2336   common = lib/libgcrypt-grub/mpi/mpih-lshift.c;
2337   common = lib/libgcrypt-grub/mpi/mpih-mul.c;
2338   common = lib/libgcrypt-grub/mpi/mpih-mul1.c;
2339   common = lib/libgcrypt-grub/mpi/mpih-mul2.c;
2340   common = lib/libgcrypt-grub/mpi/mpih-mul3.c;
2341   common = lib/libgcrypt-grub/mpi/mpih-add1.c;
2342   common = lib/libgcrypt-grub/mpi/mpih-sub1.c;
2343   common = lib/libgcrypt-grub/mpi/mpih-div.c;
2344   common = lib/libgcrypt-grub/mpi/mpicoder.c;
2345   common = lib/libgcrypt-grub/mpi/mpih-rshift.c;
2346   common = lib/libgcrypt-grub/mpi/mpi-inline.c;
2347   common = lib/libgcrypt_wrap/mem.c;
2348
2349   cflags = '$(CFLAGS_GCRY) -Wno-redundant-decls -Wno-sign-compare';
2350   cppflags = '$(CPPFLAGS_GCRY)';
2351 };
2352
2353 module = {
2354   name = all_video;
2355   common = lib/fake_module.c;
2356 };
2357
2358 module = {
2359   name = gdb;
2360   common = gdb/cstub.c;
2361   common = gdb/gdb.c;
2362   i386 = gdb/i386/idt.c;
2363   i386 = gdb/i386/machdep.S;
2364   i386 = gdb/i386/signal.c;
2365   enable = i386;
2366 };
2367
2368 module = {
2369   name = testspeed;
2370   common = commands/testspeed.c;
2371 };
2372
2373 module = {
2374   name = tr;
2375   common = commands/tr.c;
2376 };
2377
2378 module = {
2379   name = progress;
2380   common = lib/progress.c;
2381 };
2382
2383 module = {
2384   name = file;
2385   common = commands/file.c;
2386   common = commands/file32.c;
2387   common = commands/file64.c;
2388   extra_dist = commands/fileXX.c;
2389   common = loader/i386/xen_file.c;
2390   common = loader/i386/xen_file32.c;
2391   common = loader/i386/xen_file64.c;
2392   extra_dist = loader/i386/xen_fileXX.c;
2393 };