]> git.proxmox.com Git - grub2.git/blob - Makefile.util.def
Add noreturn attributes and remove unreachable code.
[grub2.git] / Makefile.util.def
1 AutoGen definitions Makefile.tpl;
2
3 library = {
4 name = libgrubkern.a;
5 cflags = '$(CFLAGS_GNULIB)';
6 cppflags = '$(CPPFLAGS_GNULIB)';
7
8 common = util/misc.c;
9 common = grub-core/kern/command.c;
10 common = grub-core/kern/device.c;
11 common = grub-core/kern/disk.c;
12 common = util/getroot.c;
13 common = util/raid.c;
14 common = grub-core/kern/emu/hostdisk.c;
15 common = grub-core/kern/emu/misc.c;
16 common = grub-core/kern/emu/mm.c;
17 common = grub-core/kern/env.c;
18 common = grub-core/kern/err.c;
19 common = grub-core/kern/file.c;
20 common = grub-core/kern/fs.c;
21 common = grub-core/kern/list.c;
22 common = grub-core/kern/misc.c;
23 common = grub-core/kern/partition.c;
24 common = grub-core/lib/crypto.c;
25 common = grub-core/disk/luks.c;
26 common = grub-core/disk/geli.c;
27 common = grub-core/disk/cryptodisk.c;
28 common = grub-core/disk/AFSplitter.c;
29 common = grub-core/lib/pbkdf2.c;
30 common = grub-core/commands/extcmd.c;
31 common = grub-core/lib/arg.c;
32 };
33
34 library = {
35 name = libgrubmods.a;
36 cflags = '$(CFLAGS_POSIX) -Wno-undef';
37 cppflags = '-I$(srcdir)/lib/posix_wrap -I$(top_srcdir)/grub-core/lib/minilzo -DMINILZO_HAVE_CONFIG_H';
38
39 common_nodist = grub_script.tab.c;
40 common_nodist = grub_script.yy.c;
41 common_nodist = libgrub_a_init.c;
42 common_nodist = grub_script.yy.h;
43 common_nodist = grub_script.tab.h;
44
45 common = grub-core/commands/blocklist.c;
46 common = grub-core/commands/xnu_uuid.c;
47 common = grub-core/commands/testload.c;
48 common = grub-core/commands/ls.c;
49 common = grub-core/disk/dmraid_nvidia.c;
50 common = grub-core/disk/loopback.c;
51 common = grub-core/disk/lvm.c;
52 common = grub-core/disk/mdraid_linux.c;
53 common = grub-core/disk/mdraid1x_linux.c;
54 common = grub-core/disk/raid5_recover.c;
55 common = grub-core/disk/raid6_recover.c;
56 common = grub-core/disk/raid.c;
57 common = grub-core/fs/affs.c;
58 common = grub-core/fs/afs.c;
59 common = grub-core/fs/bfs.c;
60 common = grub-core/fs/btrfs.c;
61 common = grub-core/fs/cpio.c;
62 common = grub-core/fs/ext2.c;
63 common = grub-core/fs/fat.c;
64 common = grub-core/fs/exfat.c;
65 common = grub-core/fs/fshelp.c;
66 common = grub-core/fs/hfs.c;
67 common = grub-core/fs/hfsplus.c;
68 common = grub-core/fs/iso9660.c;
69 common = grub-core/fs/jfs.c;
70 common = grub-core/fs/minix.c;
71 common = grub-core/fs/minix2.c;
72 common = grub-core/fs/minix3.c;
73 common = grub-core/fs/nilfs2.c;
74 common = grub-core/fs/ntfs.c;
75 common = grub-core/fs/ntfscomp.c;
76 common = grub-core/fs/reiserfs.c;
77 common = grub-core/fs/romfs.c;
78 common = grub-core/fs/sfs.c;
79 common = grub-core/fs/squash4.c;
80 common = grub-core/fs/tar.c;
81 common = grub-core/fs/udf.c;
82 common = grub-core/fs/ufs2.c;
83 common = grub-core/fs/ufs.c;
84 common = grub-core/fs/xfs.c;
85 common = grub-core/fs/zfs/zfscrypt.c;
86 common = grub-core/fs/zfs/zfs.c;
87 common = grub-core/fs/zfs/zfsinfo.c;
88 common = grub-core/fs/zfs/zfs_lzjb.c;
89 common = grub-core/fs/zfs/zfs_sha256.c;
90 common = grub-core/fs/zfs/zfs_fletcher.c;
91 common = grub-core/lib/envblk.c;
92 common = grub-core/lib/hexdump.c;
93 common = grub-core/lib/LzFind.c;
94 common = grub-core/lib/LzmaEnc.c;
95 common = grub-core/lib/crc.c;
96 common = grub-core/lib/adler32.c;
97 common = grub-core/lib/crc64.c;
98 common = grub-core/normal/datetime.c;
99 common = grub-core/normal/misc.c;
100 common = grub-core/partmap/acorn.c;
101 common = grub-core/partmap/amiga.c;
102 common = grub-core/partmap/apple.c;
103 common = grub-core/partmap/gpt.c;
104 common = grub-core/partmap/msdos.c;
105 common = grub-core/partmap/sun.c;
106 common = grub-core/partmap/plan.c;
107 common = grub-core/partmap/dvh.c;
108 common = grub-core/partmap/sunpc.c;
109 common = grub-core/partmap/bsdlabel.c;
110 common = grub-core/script/function.c;
111 common = grub-core/script/lexer.c;
112 common = grub-core/script/main.c;
113 common = grub-core/script/script.c;
114 common = grub-core/script/argv.c;
115 common = grub-core/io/gzio.c;
116 common = grub-core/io/lzopio.c;
117 common = grub-core/kern/ia64/dl_helper.c;
118 common = grub-core/lib/minilzo/minilzo.c;
119 };
120
121 program = {
122 name = grub-bin2h;
123 common = util/bin2h.c;
124 ldadd = libgrubmods.a;
125 ldadd = libgrubgcry.a;
126 ldadd = libgrubkern.a;
127 ldadd = grub-core/gnulib/libgnu.a;
128 ldadd = '$(LIBINTL) $(LIBDEVMAPPER)';
129 installdir = noinst;
130 };
131
132 program = {
133 name = grub-mkimage;
134 mansection = 1;
135
136 common = util/grub-mkimage.c;
137 common = util/resolve.c;
138 extra_dist = util/grub-mkimagexx.c;
139
140 ldadd = libgrubmods.a;
141 ldadd = libgrubgcry.a;
142 ldadd = libgrubkern.a;
143 ldadd = grub-core/gnulib/libgnu.a;
144 ldadd = '$(LIBLZMA)';
145 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
146 cppflags = '-DGRUB_PKGLIBROOTDIR=\"$(pkglibrootdir)\"';
147 };
148
149 program = {
150 name = grub-mkrelpath;
151 mansection = 1;
152
153 common = util/grub-mkrelpath.c;
154
155 ldadd = libgrubmods.a;
156 ldadd = libgrubgcry.a;
157 ldadd = libgrubkern.a;
158 ldadd = grub-core/gnulib/libgnu.a;
159 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
160 };
161
162 program = {
163 name = grub-script-check;
164 mansection = 1;
165
166 common = util/grub-script-check.c;
167
168 ldadd = libgrubmods.a;
169 ldadd = libgrubgcry.a;
170 ldadd = libgrubkern.a;
171 ldadd = grub-core/gnulib/libgnu.a;
172 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
173 };
174
175 program = {
176 name = grub-editenv;
177 mansection = 1;
178
179 common = util/grub-editenv.c;
180
181 ldadd = libgrubmods.a;
182 ldadd = libgrubgcry.a;
183 ldadd = libgrubkern.a;
184 ldadd = grub-core/gnulib/libgnu.a;
185 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
186 };
187
188 program = {
189 name = grub-mkpasswd-pbkdf2;
190 mansection = 1;
191
192 common = util/grub-mkpasswd-pbkdf2.c;
193
194 ldadd = libgrubmods.a;
195 ldadd = libgrubgcry.a;
196 ldadd = libgrubkern.a;
197 ldadd = grub-core/gnulib/libgnu.a;
198 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
199 cflags = '$(CFLAGS_GCRY)';
200 cppflags = '$(CPPFLAGS_GCRY)';
201 };
202
203 program = {
204 name = grub-macho2img;
205 mansection = 1;
206 common = util/grub-macho2img.c;
207 condition = COND_APPLE_CC;
208 };
209
210 program = {
211 name = grub-pe2elf;
212 mansection = 1;
213 common = util/grub-pe2elf.c;
214
215 ldadd = libgrubmods.a;
216 ldadd = libgrubgcry.a;
217 ldadd = libgrubkern.a;
218 ldadd = grub-core/gnulib/libgnu.a;
219 ldadd = '$(LIBINTL)';
220 condition = COND_GRUB_PE2ELF;
221 };
222
223 program = {
224 name = grub-fstest;
225 mansection = 1;
226 common_nodist = grub_fstest_init.c;
227 common = util/grub-fstest.c;
228 common = grub-core/kern/emu/hostfs.c;
229 common = grub-core/disk/host.c;
230
231 cflags = '$(CFLAGS_GCRY)';
232 cppflags = '$(CPPFLAGS_GCRY)';
233
234 ldadd = libgrubmods.a;
235 ldadd = libgrubgcry.a;
236 ldadd = libgrubkern.a;
237 ldadd = grub-core/gnulib/libgnu.a;
238 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
239 };
240
241 program = {
242 name = grub-mount;
243 mansection = 1;
244 common_nodist = grub_fstest_init.c;
245 common = util/grub-mount.c;
246 common = grub-core/kern/emu/hostfs.c;
247 common = grub-core/disk/host.c;
248
249 ldadd = libgrubmods.a;
250 ldadd = libgrubgcry.a;
251 ldadd = libgrubkern.a;
252 ldadd = grub-core/gnulib/libgnu.a;
253 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) -lfuse';
254 condition = COND_GRUB_MOUNT;
255 };
256
257 program = {
258 name = grub-mkfont;
259 mansection = 1;
260 common = util/grub-mkfont.c;
261 common = grub-core/unidata.c;
262
263 cflags = '$(freetype_cflags)';
264
265 ldadd = libgrubmods.a;
266 ldadd = libgrubgcry.a;
267 ldadd = libgrubkern.a;
268 ldadd = grub-core/gnulib/libgnu.a;
269 ldadd = '$(freetype_libs)';
270 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
271 condition = COND_GRUB_MKFONT;
272 };
273
274 program = {
275 name = grub-mkdevicemap;
276 installdir = sbin;
277 mansection = 8;
278
279 common = util/grub-mkdevicemap.c;
280 common = util/deviceiter.c;
281 nosparc64 = util/devicemap.c;
282
283 sparc64_ieee1275 = util/ieee1275/ofpath.c;
284 sparc64_ieee1275 = util/ieee1275/devicemap.c;
285
286 ldadd = libgrubmods.a;
287 ldadd = libgrubgcry.a;
288 ldadd = libgrubkern.a;
289 ldadd = grub-core/gnulib/libgnu.a;
290 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
291 };
292
293 program = {
294 name = grub-probe;
295 installdir = sbin;
296 mansection = 8;
297 common = util/grub-probe.c;
298
299 ldadd = libgrubmods.a;
300 ldadd = libgrubgcry.a;
301 ldadd = libgrubkern.a;
302 ldadd = grub-core/gnulib/libgnu.a;
303 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
304 };
305
306 program = {
307 name = grub-setup;
308 installdir = sbin;
309 mansection = 8;
310 common = util/grub-setup.c;
311 common = util/lvm.c;
312 common = grub-core/lib/reed_solomon.c;
313
314 sparc64_ieee1275 = util/ieee1275/ofpath.c;
315
316 ldadd = libgrubmods.a;
317 ldadd = libgrubkern.a;
318 ldadd = libgrubgcry.a;
319 ldadd = grub-core/gnulib/libgnu.a;
320 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
321
322 enable = i386_pc;
323 enable = sparc64_ieee1275;
324 };
325
326 program = {
327 name = grub-ofpathname;
328 installdir = sbin;
329 mansection = 8;
330 ieee1275 = util/ieee1275/grub-ofpathname.c;
331 ieee1275 = util/ieee1275/ofpath.c;
332
333 ldadd = libgrubmods.a;
334 ldadd = libgrubgcry.a;
335 ldadd = libgrubkern.a;
336 ldadd = grub-core/gnulib/libgnu.a;
337 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBUTIL) $(LIBGEOM)';
338
339 enable = sparc64_ieee1275;
340 };
341
342 program = {
343 name = grub-mklayout;
344 mansection = 1;
345
346 common = util/grub-mklayout.c;
347
348 ldadd = libgrubmods.a;
349 ldadd = libgrubgcry.a;
350 ldadd = libgrubkern.a;
351 ldadd = grub-core/gnulib/libgnu.a;
352 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
353 };
354
355 data = {
356 common = util/grub.d/README;
357 installdir = grubconf;
358 };
359
360 script = {
361 name = '00_header';
362 common = util/grub.d/00_header.in;
363 installdir = grubconf;
364 };
365
366 script = {
367 name = '10_windows';
368 common = util/grub.d/10_windows.in;
369 installdir = grubconf;
370 condition = COND_HOST_WINDOWS;
371 };
372
373 script = {
374 name = '10_hurd';
375 common = util/grub.d/10_hurd.in;
376 installdir = grubconf;
377 condition = COND_HOST_HURD;
378 };
379
380 script = {
381 name = '10_kfreebsd';
382 common = util/grub.d/10_kfreebsd.in;
383 installdir = grubconf;
384 condition = COND_HOST_KFREEBSD;
385 };
386
387 script = {
388 name = '10_illumos';
389 common = util/grub.d/10_illumos.in;
390 installdir = grubconf;
391 condition = COND_HOST_ILLUMOS;
392 };
393
394 script = {
395 name = '10_netbsd';
396 common = util/grub.d/10_netbsd.in;
397 installdir = grubconf;
398 condition = COND_HOST_NETBSD;
399 };
400
401 script = {
402 name = '10_linux';
403 common = util/grub.d/10_linux.in;
404 installdir = grubconf;
405 condition = COND_HOST_LINUX;
406 };
407
408 script = {
409 name = '20_linux_xen';
410 common = util/grub.d/20_linux_xen.in;
411 installdir = grubconf;
412 condition = COND_HOST_LINUX;
413 };
414
415 script = {
416 name = '30_os-prober';
417 common = util/grub.d/30_os-prober.in;
418 installdir = grubconf;
419 };
420
421 script = {
422 name = '40_custom';
423 common = util/grub.d/40_custom.in;
424 installdir = grubconf;
425 };
426
427 script = {
428 name = '41_custom';
429 common = util/grub.d/41_custom.in;
430 installdir = grubconf;
431 };
432
433 script = {
434 mansection = 1;
435 name = grub-mkrescue;
436 x86 = util/grub-mkrescue.in;
437 powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in;
438 enable = i386_pc;
439 enable = i386_efi;
440 enable = x86_64_efi;
441 enable = i386_qemu;
442 enable = i386_multiboot;
443 enable = i386_coreboot;
444 enable = powerpc_ieee1275;
445 };
446
447 script = {
448 mansection = 1;
449 name = grub-mkstandalone;
450 common = util/grub-mkstandalone.in;
451 };
452
453 script = {
454 mansection = 8;
455 installdir = sbin;
456 name = grub-install;
457
458 common = util/grub-install.in;
459 enable = noemu;
460 };
461
462 script = {
463 mansection = 8;
464 installdir = sbin;
465 name = grub-mknetdir;
466
467 common = util/grub-mknetdir.in;
468 };
469
470 script = {
471 name = grub-mkconfig;
472 common = util/grub-mkconfig.in;
473 mansection = 8;
474 installdir = sbin;
475 };
476
477 script = {
478 name = grub-set-default;
479 common = util/grub-set-default.in;
480 mansection = 8;
481 installdir = sbin;
482 };
483
484 script = {
485 name = grub-reboot;
486 common = util/grub-reboot.in;
487 mansection = 8;
488 installdir = sbin;
489 };
490
491 script = {
492 name = grub-mkconfig_lib;
493 common = util/grub-mkconfig_lib.in;
494 installdir = noinst;
495 };
496
497 script = {
498 name = update-grub_lib;
499 common = util/update-grub_lib.in;
500 installdir = noinst;
501 };
502
503 script = {
504 name = grub-kbdcomp;
505 common = util/grub-kbdcomp.in;
506 };
507
508 script = {
509 name = grub-shell;
510 common = tests/util/grub-shell.in;
511 installdir = noinst;
512 };
513
514 script = {
515 name = grub-shell-tester;
516 common = tests/util/grub-shell-tester.in;
517 installdir = noinst;
518 };
519
520 script = {
521 testcase;
522 name = example_scripted_test;
523 common = tests/example_scripted_test.in;
524 };
525
526 script = {
527 testcase;
528 name = example_grub_script_test;
529 common = tests/example_grub_script_test.in;
530 };
531
532 script = {
533 testcase;
534 name = grub_script_echo1;
535 common = tests/grub_script_echo1.in;
536 };
537
538 script = {
539 testcase;
540 name = grub_script_echo_keywords;
541 common = tests/grub_script_echo_keywords.in;
542 };
543
544 script = {
545 testcase;
546 name = grub_script_vars1;
547 common = tests/grub_script_vars1.in;
548 };
549
550 script = {
551 testcase;
552 name = grub_script_for1;
553 common = tests/grub_script_for1.in;
554 };
555
556 script = {
557 testcase;
558 name = grub_script_while1;
559 common = tests/grub_script_while1.in;
560 };
561
562 script = {
563 testcase;
564 name = grub_script_if;
565 common = tests/grub_script_if.in;
566 };
567
568 script = {
569 testcase;
570 name = grub_script_blanklines;
571 common = tests/grub_script_blanklines.in;
572 };
573
574 script = {
575 testcase;
576 name = grub_script_final_semicolon;
577 common = tests/grub_script_final_semicolon.in;
578 };
579
580 script = {
581 testcase;
582 name = grub_script_dollar;
583 common = tests/grub_script_dollar.in;
584 };
585
586 script = {
587 testcase;
588 name = grub_script_comments;
589 common = tests/grub_script_comments.in;
590 };
591
592 script = {
593 testcase;
594 name = grub_script_functions;
595 common = tests/grub_script_functions.in;
596 };
597
598 script = {
599 testcase;
600 name = grub_script_break;
601 common = tests/grub_script_break.in;
602 };
603
604 script = {
605 testcase;
606 name = grub_script_continue;
607 common = tests/grub_script_continue.in;
608 };
609
610 script = {
611 testcase;
612 name = grub_script_shift;
613 common = tests/grub_script_shift.in;
614 };
615
616 script = {
617 testcase;
618 name = grub_script_blockarg;
619 common = tests/grub_script_blockarg.in;
620 };
621
622 script = {
623 testcase;
624 name = grub_script_setparams;
625 common = tests/grub_script_setparams.in;
626 };
627
628 script = {
629 testcase;
630 name = grub_script_return;
631 common = tests/grub_script_return.in;
632 };
633
634 script = {
635 testcase;
636 name = grub_cmd_regexp;
637 common = tests/grub_cmd_regexp.in;
638 };
639
640 script = {
641 testcase;
642 name = grub_script_expansion;
643 common = tests/grub_script_expansion.in;
644 };
645
646 script = {
647 testcase;
648 name = grub_script_not;
649 common = tests/grub_script_not.in;
650 };
651
652 script = {
653 testcase;
654 name = partmap_test;
655 common = tests/partmap_test.in;
656 };
657
658 script = {
659 testcase;
660 name = grub_cmd_echo;
661 common = tests/grub_cmd_echo.in;
662 };
663
664 program = {
665 testcase;
666 name = example_unit_test;
667 common = tests/example_unit_test.c;
668 common = tests/lib/unit_test.c;
669 common = grub-core/kern/list.c;
670 common = grub-core/kern/misc.c;
671 common = grub-core/tests/lib/test.c;
672 cflags = -Wno-format;
673 ldadd = libgrubmods.a;
674 ldadd = libgrubgcry.a;
675 ldadd = libgrubkern.a;
676 ldadd = grub-core/gnulib/libgnu.a;
677 ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
678 };
679
680 program = {
681 testcase;
682 name = printf_test;
683 common = tests/printf_unit_test.c;
684 common = tests/lib/unit_test.c;
685 common = grub-core/kern/list.c;
686 common = grub-core/kern/misc.c;
687 common = grub-core/tests/lib/test.c;
688 ldadd = libgrubmods.a;
689 ldadd = libgrubgcry.a;
690 ldadd = libgrubkern.a;
691 ldadd = grub-core/gnulib/libgnu.a;
692 ldadd = '$(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
693 };
694
695 program = {
696 name = grub-menulst2cfg;
697 mansection = 1;
698 common = util/grub-menulst2cfg.c;
699 common = grub-core/lib/legacy_parse.c;
700 common = grub-core/lib/i386/pc/vesa_modes_table.c;
701
702 ldadd = libgrubmods.a;
703 ldadd = libgrubgcry.a;
704 ldadd = libgrubkern.a;
705 ldadd = grub-core/gnulib/libgnu.a;
706 ldadd = '$(LIBINTL) $(LIBDEVMAPPER) $(LIBZFS) $(LIBNVPAIR) $(LIBGEOM)';
707 };