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