grub/Makefile.am

85 lines
2.7 KiB
Text
Raw Normal View History

2010-05-06 11:34:04 +05:30
AUTOMAKE_OPTIONS = subdir-objects
2010-08-18 16:53:11 +05:30
DEPDIR = .deps-util
2010-05-06 11:34:04 +05:30
SUBDIRS = . grub-core po docs
include $(top_srcdir)/conf/Makefile.common
include $(top_srcdir)/conf/Makefile.extra-dist
AM_CFLAGS = $(HOST_CFLAGS)
AM_LDFLAGS = $(HOST_LDFLAGS)
AM_CPPFLAGS = $(HOST_CPPFLAGS) $(CPPFLAGS_DEFAULT)
AM_CCASFLAGS = $(HOST_CCASFLAGS) $(CCASFLAGS_DEFAULT)
CFLAGS_PROGRAM += $(CFLAGS_GNULIB)
LDFLAGS_PROGRAM += $(LDFLAGS_GNULIB)
CPPFLAGS_PROGRAM += $(CPPFLAGS_GNULIB)
CCASFLAGS_PROGRAM += $(CCASFLAGS_GNULIB)
2010-05-06 11:34:04 +05:30
2010-08-20 18:21:31 +05:30
include $(srcdir)/Makefile.util.am
2010-05-10 15:37:18 +05:30
2010-05-06 11:34:04 +05:30
# XXX Use Automake's LEX & YACC support
2010-08-06 10:01:54 +05:30
grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y
2010-05-06 11:34:04 +05:30
$(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/grub-core/script/parser.y
2010-08-06 10:01:54 +05:30
grub_script.tab.c: grub_script.tab.h
2010-05-06 11:34:04 +05:30
CLEANFILES += grub_script.tab.c grub_script.tab.h
# For the lexer.
2010-08-06 10:01:54 +05:30
grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l
2010-05-06 11:34:04 +05:30
$(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/grub-core/script/yylex.l
2010-08-06 10:01:54 +05:30
grub_script.yy.c: grub_script.yy.h
2010-05-06 11:34:04 +05:30
CLEANFILES += grub_script.yy.c grub_script.yy.h
2010-06-04 09:34:28 +05:30
# For libgrub.a
libgrub.pp: grub_script.tab.h grub_script.yy.h $(libgrub_a_SOURCES)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgrub_a_CPPFLAGS) $(CPPFLAGS) \
2010-06-03 11:52:33 +05:30
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
2010-06-04 09:34:28 +05:30
CLEANFILES += libgrub.pp
2010-06-03 11:52:33 +05:30
2010-06-04 09:34:28 +05:30
libgrub_a_init.lst: libgrub.pp
2010-06-03 11:52:33 +05:30
cat $< | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
2010-06-04 09:34:28 +05:30
CLEANFILES += libgrub_a_init.lst
2010-05-06 11:34:04 +05:30
2010-06-04 09:34:28 +05:30
libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh
2010-06-03 11:52:33 +05:30
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
2010-06-04 09:34:28 +05:30
CLEANFILES += libgrub_a_init.c
2010-05-06 11:34:04 +05:30
if COND_GRUB_MKFONT
if COND_HAVE_FONT_SOURCE
2010-08-23 13:23:56 +05:30
grubdata_DATA = unicode.pf2 ascii.pf2 ascii.h widthspec.h
2010-05-06 11:34:04 +05:30
endif
endif
unicode.pf2: $(FONT_SOURCE) grub-mkfont
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE)
CLEANFILES += unicode.pf2
# Arrows and lines are needed to draw the menu, so always include them
UNICODE_ARROWS=0x2190-0x2193
UNICODE_LINES=0x2501-0x251B
ascii.pf2: $(FONT_SOURCE) grub-mkfont
$(builddir)/grub-mkfont -o $@ $(FONT_SOURCE) -r 0x0-0x7f,$(UNICODE_ARROWS),$(UNICODE_LINES)
CLEANFILES += ascii.pf2
ascii.bitmaps: $(FONT_SOURCE) grub-mkfont
$(builddir)/grub-mkfont --ascii-bitmaps -o $@ $(FONT_SOURCE)
CLEANFILES += ascii.bitmaps
ascii.h: ascii.bitmaps grub-bin2h
$(builddir)/grub-bin2h ascii_bitmaps < $< > $@
CLEANFILES += ascii.h $(top_builddir)/grub-core/include/ascii.h
2010-07-13 00:43:28 +05:30
widthspec.bin: $(FONT_SOURCE) grub-mkfont
$(builddir)/grub-mkfont --width-spec -o $@ $(FONT_SOURCE)
CLEANFILES += widthspec.bin
widthspec.h: widthspec.bin grub-bin2h
$(builddir)/grub-bin2h widthspec < $< > $@
CLEANFILES += widthspec.h
2010-06-03 15:30:15 +05:30
# Install config.h into platformdir
2010-05-06 11:34:04 +05:30
platform_HEADERS = config.h
2010-08-20 18:21:31 +05:30
2010-08-23 13:23:56 +05:30
pkglib_DATA += grub-mkconfig_lib
pkglib_DATA += update-grub_lib