]>
Commit | Line | Data |
---|---|---|
8c411768 | 1 | AUTOMAKE_OPTIONS = subdir-objects |
8c411768 | 2 | |
019be613 | 3 | DEPDIR = .deps-util |
8c411768 BC |
4 | SUBDIRS = . grub-core po docs |
5 | ||
a5a3bccd BC |
6 | include $(top_srcdir)/conf/Makefile.common |
7 | include $(top_srcdir)/conf/Makefile.extra-dist | |
c49e5dff | 8 | |
a5a3bccd BC |
9 | AM_CFLAGS = $(HOST_CFLAGS) |
10 | AM_LDFLAGS = $(HOST_LDFLAGS) | |
11 | AM_CPPFLAGS = $(HOST_CPPFLAGS) $(CPPFLAGS_DEFAULT) | |
12 | AM_CCASFLAGS = $(HOST_CCASFLAGS) $(CCASFLAGS_DEFAULT) | |
c49e5dff | 13 | |
a5a3bccd BC |
14 | CFLAGS_PROGRAM += $(CFLAGS_GNULIB) |
15 | LDFLAGS_PROGRAM += $(LDFLAGS_GNULIB) | |
16 | CPPFLAGS_PROGRAM += $(CPPFLAGS_GNULIB) | |
17 | CCASFLAGS_PROGRAM += $(CCASFLAGS_GNULIB) | |
8c411768 | 18 | |
3d9d3542 | 19 | include $(srcdir)/Makefile.util.am |
2e33ae0d | 20 | |
8c411768 | 21 | # XXX Use Automake's LEX & YACC support |
02c9030a | 22 | grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y |
8c411768 | 23 | $(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/grub-core/script/parser.y |
02c9030a | 24 | grub_script.tab.c: grub_script.tab.h |
8c411768 BC |
25 | CLEANFILES += grub_script.tab.c grub_script.tab.h |
26 | ||
27 | # For the lexer. | |
02c9030a | 28 | grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l |
8c411768 | 29 | $(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/grub-core/script/yylex.l |
02c9030a | 30 | grub_script.yy.c: grub_script.yy.h |
8c411768 BC |
31 | CLEANFILES += grub_script.yy.c grub_script.yy.h |
32 | ||
d5c3b7ce BC |
33 | # For libgrub.a |
34 | libgrub.pp: grub_script.tab.h grub_script.yy.h $(libgrub_a_SOURCES) | |
35 | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrub_a_CPPFLAGS) $(CPPFLAGS) \ | |
a60f6ee1 | 36 | -D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1) |
d5c3b7ce | 37 | CLEANFILES += libgrub.pp |
a60f6ee1 | 38 | |
d5c3b7ce | 39 | libgrub_a_init.lst: libgrub.pp |
a60f6ee1 | 40 | cat $< | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1) |
d5c3b7ce | 41 | CLEANFILES += libgrub_a_init.lst |
8c411768 | 42 | |
d5c3b7ce | 43 | libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh |
a60f6ee1 | 44 | sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1) |
d5c3b7ce | 45 | CLEANFILES += libgrub_a_init.c |
8c411768 BC |
46 | |
47 | if COND_GRUB_MKFONT | |
48 | if COND_HAVE_FONT_SOURCE | |
f7711f5e | 49 | grubdata_DATA = unicode.pf2 ascii.pf2 ascii.h widthspec.h |
8c411768 BC |
50 | endif |
51 | endif | |
52 | ||
53 | unicode.pf2: $(FONT_SOURCE) grub-mkfont | |
54 | $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) | |
55 | CLEANFILES += unicode.pf2 | |
56 | ||
57 | # Arrows and lines are needed to draw the menu, so always include them | |
58 | UNICODE_ARROWS=0x2190-0x2193 | |
59 | UNICODE_LINES=0x2501-0x251B | |
60 | ||
61 | ascii.pf2: $(FONT_SOURCE) grub-mkfont | |
62 | $(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES) | |
63 | CLEANFILES += ascii.pf2 | |
64 | ||
65 | ascii.bitmaps: $(FONT_SOURCE) grub-mkfont | |
66 | $(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE) | |
67 | CLEANFILES += ascii.bitmaps | |
68 | ||
69 | ascii.h: ascii.bitmaps grub-bin2h | |
70 | $(builddir)/grub-bin2h ascii_bitmaps < $< > $@ | |
8c411768 BC |
71 | CLEANFILES += ascii.h $(top_builddir)/grub-core/include/ascii.h |
72 | ||
297f0c2b BC |
73 | widthspec.bin: $(FONT_SOURCE) grub-mkfont |
74 | $(builddir)/grub-mkfont --width-spec -o $@ $(FONT_SOURCE) | |
75 | CLEANFILES += widthspec.bin | |
76 | ||
77 | widthspec.h: widthspec.bin grub-bin2h | |
78 | $(builddir)/grub-bin2h widthspec < $< > $@ | |
79 | CLEANFILES += widthspec.h | |
80 | ||
610c1efd | 81 | # Install config.h into platformdir |
8c411768 | 82 | platform_HEADERS = config.h |
3d9d3542 | 83 | |
f7711f5e BC |
84 | pkglib_DATA += grub-mkconfig_lib |
85 | pkglib_DATA += update-grub_lib |