2010-05-06 06:04:04 +00:00
|
|
|
AUTOMAKE_OPTIONS = subdir-objects
|
|
|
|
|
2010-08-18 11:23:11 +00:00
|
|
|
DEPDIR = .deps-util
|
2010-05-06 06:04:04 +00:00
|
|
|
SUBDIRS = . grub-core po docs
|
2010-06-04 04:04:28 +00:00
|
|
|
EXTRA_DIST = autogen.sh gentpl.py Makefile.tpl modules.def geninit.sh
|
2010-08-18 06:27:51 +00:00
|
|
|
EXTRA_DIST += include conf/i386-pc-cygwin-img-ld.sc
|
2010-05-06 06:04:04 +00:00
|
|
|
|
2010-08-17 13:47:57 +00:00
|
|
|
grubconfdir = $(sysconfdir)/grub.d
|
|
|
|
platformdir = $(pkglibrootdir)/$(target_cpu)-$(platform)
|
|
|
|
|
|
|
|
# Platform specific options
|
|
|
|
if COND_i386_pc
|
|
|
|
CFLAGS_PLATFORM = -mrtd -mregparm=3
|
|
|
|
endif
|
|
|
|
if COND_i386_efi
|
|
|
|
LDFLAGS_PLATFORM = -melf_i386
|
|
|
|
endif
|
|
|
|
if COND_x86_64_efi
|
|
|
|
LDFLAGS_PLATFORM = -melf_x86_64
|
|
|
|
endif
|
|
|
|
if COND_i386_qemu
|
|
|
|
CFLAGS_PLATFORM = -mrtd -mregparm=3
|
|
|
|
endif
|
|
|
|
if COND_i386_coreboot
|
|
|
|
CFLAGS_PLATFORM = -mrtd -mregparm=3
|
|
|
|
endif
|
|
|
|
if COND_i386_ieee1275
|
|
|
|
CFLAGS_PLATFORM = -mrtd -mregparm=3
|
|
|
|
endif
|
|
|
|
if COND_mips_yeeloong
|
|
|
|
CFLAGS_PLATFORM = -march=mips3 -mexplicit-relocs -mflush-func=grub_cpu_flush_cache
|
|
|
|
CCASFLAGS_PLATFORM = -march=mips3
|
|
|
|
endif
|
|
|
|
if COND_sparc64_ieee1275
|
|
|
|
CFLAGS_PLATFORM = -mno-app-regs
|
|
|
|
LDFLAGS_PLATFORM = -melf64_sparc -mno-relax
|
|
|
|
endif
|
|
|
|
|
|
|
|
CPPFLAGS_GRUB = -DGRUB_FILE=\"`basename $<`\"
|
|
|
|
CPPFLAGS_GRUB += -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir)
|
|
|
|
CPPFLAGS_GRUB += -I$(top_srcdir)/include
|
|
|
|
CPPFLAGS_GRUB += -I$(top_builddir)/include
|
|
|
|
CCASFLAGS_GRUB = -DASM_FILE=1
|
|
|
|
|
|
|
|
CFLAGS_GCRY = -Wno-error -Wno-missing-field-initializers
|
2010-08-17 14:11:43 +00:00
|
|
|
CPPFLAGS_GCRY = -I$(top_srcdir)/grub-core/lib/libgcrypt_wrap
|
2010-08-17 13:47:57 +00:00
|
|
|
|
|
|
|
CFLAGS_GNULIB = -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))"
|
2010-08-17 14:11:43 +00:00
|
|
|
CPPFLAGS_GNULIB = -I$(top_srcdir)/grub-core/gnulib
|
2010-08-17 13:47:57 +00:00
|
|
|
|
|
|
|
CFLAGS_MKISOFS = -Wno-all -Werror
|
|
|
|
CPPFLAGS_MKISOFS = -D_FILE_OFFSET_BITS=64 -I$(top_srcdir)/util/mkisofs/include
|
|
|
|
|
|
|
|
CFLAGS_POSIX = -fno-builtin
|
2010-08-17 14:11:43 +00:00
|
|
|
CPPFLAGS_POSIX = -I$(top_srcdir)/grub-core/lib/posix_wrap
|
2010-08-17 13:47:57 +00:00
|
|
|
|
2010-08-17 14:11:43 +00:00
|
|
|
CPPFLAGS_EFIEMU = -I$(top_srcdir)/grub-core/efiemu/runtime
|
2010-08-17 13:47:57 +00:00
|
|
|
|
|
|
|
# to calm down automake
|
|
|
|
BUILT_SOURCES =
|
|
|
|
CLEANFILES =
|
|
|
|
COMMAND_FILES =
|
|
|
|
DEF_FILES =
|
|
|
|
FS_FILES =
|
|
|
|
HANDLER_FILES =
|
|
|
|
IMG_FILES =
|
|
|
|
MOD_FILES =
|
|
|
|
MODULE_FILES =
|
|
|
|
PARTMAP_FILES =
|
|
|
|
PARTTOOL_FILES =
|
|
|
|
TERMINAL_FILES =
|
|
|
|
TESTS =
|
|
|
|
UND_FILES =
|
|
|
|
VIDEO_FILES =
|
|
|
|
bin_PROGRAMS =
|
|
|
|
bin_SCRIPTS =
|
|
|
|
check_PROGRAMS =
|
|
|
|
check_SCRIPTS =
|
|
|
|
grubconf_DATA =
|
|
|
|
grubconf_SCRIPTS =
|
|
|
|
man_MANS =
|
|
|
|
noinst_DATA =
|
|
|
|
noinst_LIBRARIES =
|
|
|
|
noinst_PROGRAMS =
|
|
|
|
pkglib_SCRIPTS =
|
|
|
|
platform_DATA =
|
|
|
|
sbin_PROGRAMS =
|
|
|
|
sbin_SCRIPTS =
|
2010-05-06 06:04:04 +00:00
|
|
|
|
|
|
|
CFLAGS_PROGRAM = $(HOST_CFLAGS) $(CFLAGS_GNULIB)
|
2010-06-05 06:10:25 +00:00
|
|
|
LDFLAGS_PROGRAM = $(HOST_LDFLAGS) $(LDFLAGS_GNULIB)
|
2010-05-06 06:04:04 +00:00
|
|
|
CPPFLAGS_PROGRAM = $(HOST_CPPFLAGS) $(CPPFLAGS_GNULIB)
|
|
|
|
CCASFLAGS_PROGRAM = $(HOST_CCASFLAGS) $(CCASFLAGS_GNULIB)
|
|
|
|
|
|
|
|
CFLAGS_LIBRARY = $(CFLAGS_PROGRAM)
|
|
|
|
CPPFLAGS_LIBRARY = $(CPPFLAGS_PROGRAM)
|
|
|
|
CCASFLAGS_LIBRARY = $(CCASFLAGS_PROGRAM)
|
|
|
|
|
|
|
|
AM_CFLAGS =
|
|
|
|
AM_LDFLAGS =
|
2010-06-03 10:00:15 +00:00
|
|
|
AM_CPPFLAGS = $(CPPFLAGS_GRUB)
|
|
|
|
AM_CCASFLAGS = $(CCASFLAGS_GRUB)
|
2010-05-06 06:04:04 +00:00
|
|
|
|
2010-05-10 10:07:18 +00:00
|
|
|
include $(srcdir)/modules.am
|
|
|
|
|
2010-05-06 06:04:04 +00:00
|
|
|
# XXX Use Automake's LEX & YACC support
|
2010-08-06 04:31:54 +00:00
|
|
|
grub_script.tab.h: $(top_srcdir)/grub-core/script/parser.y
|
2010-05-06 06:04:04 +00:00
|
|
|
$(YACC) -d -p grub_script_yy -b grub_script $(top_srcdir)/grub-core/script/parser.y
|
2010-08-06 04:31:54 +00:00
|
|
|
grub_script.tab.c: grub_script.tab.h
|
2010-05-06 06:04:04 +00:00
|
|
|
CLEANFILES += grub_script.tab.c grub_script.tab.h
|
|
|
|
|
|
|
|
# For the lexer.
|
2010-08-06 04:31:54 +00:00
|
|
|
grub_script.yy.h: $(top_srcdir)/grub-core/script/yylex.l
|
2010-05-06 06:04:04 +00:00
|
|
|
$(LEX) -o grub_script.yy.c --header-file=grub_script.yy.h $(top_srcdir)/grub-core/script/yylex.l
|
2010-08-06 04:31:54 +00:00
|
|
|
grub_script.yy.c: grub_script.yy.h
|
2010-05-06 06:04:04 +00:00
|
|
|
CLEANFILES += grub_script.yy.c grub_script.yy.h
|
|
|
|
|
2010-06-04 04:04:28 +00:00
|
|
|
# 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 06:22:33 +00:00
|
|
|
-D'GRUB_MOD_INIT(x)=@MARKER@x@' $^ > $@ || (rm -f $@; exit 1)
|
2010-06-04 04:04:28 +00:00
|
|
|
CLEANFILES += libgrub.pp
|
2010-06-03 06:22:33 +00:00
|
|
|
|
2010-06-04 04:04:28 +00:00
|
|
|
libgrub_a_init.lst: libgrub.pp
|
2010-06-03 06:22:33 +00:00
|
|
|
cat $< | grep '@MARKER@' | sed 's/@MARKER@\(.*\)@/\1/g' | sort -u > $@ || (rm -f $@; exit 1)
|
2010-06-04 04:04:28 +00:00
|
|
|
CLEANFILES += libgrub_a_init.lst
|
2010-05-06 06:04:04 +00:00
|
|
|
|
2010-06-04 04:04:28 +00:00
|
|
|
libgrub_a_init.c: libgrub_a_init.lst $(top_srcdir)/geninit.sh
|
2010-06-03 06:22:33 +00:00
|
|
|
sh $(top_srcdir)/geninit.sh `cat $<` > $@ || (rm -f $@; exit 1)
|
2010-06-04 04:04:28 +00:00
|
|
|
CLEANFILES += libgrub_a_init.c
|
2010-05-06 06:04:04 +00:00
|
|
|
|
|
|
|
if COND_GRUB_MKFONT
|
|
|
|
if COND_HAVE_FONT_SOURCE
|
|
|
|
pkgdata_DATA = unicode.pf2 ascii.pf2 ascii.h
|
|
|
|
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-12 19:13:28 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# XXX: TARGET_CFLAGS += -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1
|
|
|
|
|
2010-06-03 10:00:15 +00:00
|
|
|
# Install config.h into platformdir
|
2010-05-06 06:04:04 +00:00
|
|
|
platform_HEADERS = config.h
|