grub/Makefile.in

272 lines
7.9 KiB
Makefile
Raw Normal View History

2002-12-27 08:53:07 +00:00
# -*- makefile -*-
#
# Copyright (C) 1994,95,96,97,98,99,2000,01,02,04 Free Software Foundation, Inc.
2002-12-27 08:53:07 +00:00
#
# This Makefile.in is free software; the author
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
### The configure script will replace these variables.
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
pkgdatadir = $(datadir)/@PACKAGE_TARNAME@/$(host_cpu)-$(host_vendor)
pkglibdir = $(libdir)/@PACKAGE_TARNAME@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
mkinstalldirs = $(srcdir)/mkinstalldirs
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W
BUILD_CC = @BUILD_CC@
2002-12-27 08:53:07 +00:00
BUILD_CFLAGS = -g -O2
BUILD_CPPFLAGS = -I. -Iinclude -I$(srcdir)/include -Wall -W \
-DGRUB_DATADIR=\"$(pkgdatadir)\"
2002-12-27 08:53:07 +00:00
OBJCOPY = @OBJCOPY@
STRIP = @STRIP@
NM = @NM@
LD = @LD@
2002-12-27 08:53:07 +00:00
RUBY = @RUBY@
### General variables.
RMKFILES = $(addprefix conf/,i386-pc.rmk powerpc-ieee1275.rmk)
2002-12-27 08:53:07 +00:00
MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
COMMON_DISTFILES = AUTHORS COPYING ChangeLog INSTALL NEWS README \
THANKS TODO Makefile.in aclocal.m4 autogen.sh config.guess \
config.h.in config.sub configure configure.ac genkernsyms.sh \
genmk.rb genmodsrc.sh gensymlist.sh install-sh mkinstalldirs \
stamp-h.in
BOOT_DISTFILES = $(addprefix boot/i386/pc/,boot.S diskboot.S)
CONF_DISTFILES = $(RMKFILES) $(MKFILES)
DISK_DISTFILES = $(addprefix disk/i386/pc/,biosdisk.c partition.c)
FS_DISTFILES = $(addprefix fs/,fat.c)
INCLUDE_DISTFILES = $(addprefix include/grub/,boot.h device.h disk.h \
2002-12-27 08:53:07 +00:00
dl.h elf.h err.h file.h fs.h kernel.h loader.h misc.h mm.h \
net.h rescue.h symbol.h term.h types.h) \
$(addprefix include/grub/util/,misc.h resolve.h) \
include/grub/i386/types.h \
$(addprefix include/grub/i386/pc/,biosdisk.h boot.h \
console.h init.h kernel.h loader.h memory.h partition.h) \
$(addprefix include/grub/i386/pc/util/,biosdisk.h)
2002-12-27 08:53:07 +00:00
KERN_DISTFILES = $(addprefix kern/,device.c disk.c dl.c err.c file.c \
fs.c loader.c main.c misc.c mm.c rescue.c term.c) \
kern/i386/dl.c \
$(addprefix kern/i386/pc/,init.c startup.S)
LOADER_DISTFILES = $(addprefix loader/i386/pc/,chainloader.c)
TERM_DISTFILES = $(addprefix term/i386/pc/,console.c)
UTIL_DISTFILES = $(addprefix util/,genmoddep.c misc.c resolve.c) \
$(addprefix util/i386/pc/,biosdisk.c grub-mkimage.c \
grub-setup.c)
2002-12-27 08:53:07 +00:00
DISTFILES = $(COMMON_DISTFILES) $(BOOT_DISTFILES) $(CONF_DISTFILES) \
$(DISK_DISTFILES) $(FS_DISTFILES) $(INCLUDE_DISTFILES) \
$(KERN_DISTFILES) $(LOADER_DISTFILES) $(TERM_DISTFILES) \
$(UTIL_DISTFILES)
2004-12-27 Marco Gerards <metgerards@student.han.nl> * genmk.rb: Handle the `Program' class in the main loop. Written by Johan Rydberg <jrydberg@gnu.org>. (Program): New class. (programs): New variable. * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h> instead of "grub/machine/ieee1275.h". Include <grub/kernel.h> instead of "grub/kernel.h". Include <grub/machine/init.h>. (help_arch): Function removed. * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `powerpc/libgcc.h' and `loader.h'. (pkgdata_PROGRAMS): New variable. (sbin_UTILITIES): Variable removed. (grub_emu_SOURCES): Added kern/powerpc/cache.S. (grubof_SOURCES): Variable re-defined so it only includes the core functionality. (grubof_CFLAGS): Remove `-DGRUBOF'. (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS, (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES) (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS) (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES) (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS) (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES) (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS) (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS) (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES) (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS) (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS) (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES) (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS) (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES) (pc_mod_CFLAGS): New variables. * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>. (grub_ofdisk_iterate): Add a prototype for `dev_iterate'. * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype. * include/grub/loader.h (grub_os_area_addr, grub_os_area_size): Moved from here... * include/grub/i386/pc/init.h (grub_os_area_addr) (rub_os_area_size): ... to here. * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn): Export symbol. * include/grub/powerpc/ieee1275/init.h: New file. * include/grub/powerpc/libgcc.h: Likewise. * include/grub/cache.h: Likewise. * kern/powerpc/cache.S: Likewise. Written by Hollis Blanchard <hollis@penguinppc.org>. * kern/dl.c: Include <grub/cache.h>. (grub_dl_flush_cache): New function. (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache for this module. * kern/powerpc/ieee1275/init.c (grub_ofdisk_init) (grub_console_init): Removed prototypes. (grub_machine_init): Don't initialize the modules anymore. * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function static. * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN): Macro undef removed. (GRUB_HOST_WORDS_BIGENDIAN): New macro. * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add relocation `R_PPC_REL32'. Return an error when the relocation is unknown. * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'. * kern/i386/pc/init.c (grub_arch_sync_caches): New function. * util/misc.c (grub_arch_sync_caches): Likewise.
2004-12-27 13:46:20 +00:00
DATA = $(pkgdata_IMAGES) $(pkgdata_MODULES) $(pkgdata_PROGRAMS)
2002-12-27 08:53:07 +00:00
PROGRAMS = $(bin_UTILITIES) $(sbin_UTILITIES)
SCRIPTS =
CLEANFILES =
MOSTLYCLEANFILES =
DISTCLEANFILES = config.status config.cache config.log config.h \
Makefile stamp-h include/grub/cpu include/grub/machine
2002-12-27 08:53:07 +00:00
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
# The default target.
all: all-local
### Include an arch-specific Makefile.
$(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
if test "x$(RUBY)" = x; then \
touch $@; \
else \
$(RUBY) $(srcdir)/genmk.rb < $< > $@; \
fi
include $(srcdir)/conf/$(host_cpu)-$(host_vendor).mk
### General targets.
all-local: $(PROGRAMS) $(DATA) $(SCRIPTS)
install: install-local
install-local: all
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
@list='$(pkgdata_IMAGES) $(pkgdata_MODULES)'; for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
dest="`echo $$file | sed 's,.*/,,'`"; \
$(INSTALL_DATA) $$dir$$file $(DESTDIR)$(pkgdatadir)/$$dest; \
done
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_UTILITIES)'; for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
dest="`echo $$file | sed 's,.*/,,'`"; \
$(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
done
$(mkinstalldirs) $(DESTDIR)$(sbindir)
@list='$(sbin_UTILITIES)'; for file in $$list; do \
if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
dest="`echo $$file | sed 's,.*/,,'`"; \
$(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
done
2002-12-27 08:53:07 +00:00
install-strip:
$(MAKE) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" install
uninstall:
@list='$(pkgdata_IMAGES) $(pkgdata_MODULES)'; for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \
rm -f $(DESTDIR)$(pkgdatadir)/$$dest; \
done
@list='$(bin_UTILITIES)'; for file in $$list; do \
2002-12-27 08:53:07 +00:00
dest="`echo $$file | sed 's,.*/,,'`"; \
rm -f $(DESTDIR)$(bindir)/$$dest; \
done
@list='$(sbin_UTILITIES)'; for file in $$list; do \
dest="`echo $$file | sed 's,.*/,,'`"; \
rm -f $(DESTDIR)$(sbindir)/$$dest; \
done
2002-12-27 08:53:07 +00:00
clean:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
mostlyclean: clean
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
distclean: mostlyclean
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-rm -rf $(srcdir)/autom4te.cache
maintainer-clean: distclean
-test -z "$(MAINTAINER_CLEANFILES)" || rm -f $(MAINTAINER_CLEANFILES)
info:
dvi:
distdir=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
distdir: $(DISTFILES)
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
$(mkinstalldirs) $(distdir)
for i in $(DISTFILES); do \
dir=`echo "$$i" | sed 's:/[^/]*$$::'`; \
if test -d $(srcdir)/$$dir; then \
$(mkinstalldirs) $(distdir)/$$dir; \
fi; \
cp -p $(srcdir)/$$i $(distdir)/$$i || exit 1; \
done
chmod -R a+r $(distdir)
GZIP_ENV = --best
dist: distdir
tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
distcheck: dist
-chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
GZIP=$(GZIP_ENV) gzip -cd $(distdir).tar.gz | tar xf -
chmod -R a-w $(distdir)
chmod a+w $(distdir)
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
chmod a-w $(distdir)
dc_instdir=`CDPATH=: && cd $(distdir)/=inst && pwd` \
&& cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_instdir \
&& $(MAKE) all dvi check install uninstall \
&& (test `find $$dc_instdir -type f -print | wc -l` -le 1 \
|| (echo "Error: files left after uninstall" 1>&2; \
exit 1)) \
&& $(MAKE) dist distclean \
&& rm -f $(distdir).tar.gz \
&& (test `find . -type f -print | wc -l` -eq 0 \
|| (echo "Error: files left after distclean" 1>&2; \
exit 1))
-chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;p;x'
check:
.SUFFIX:
.SUFFIX: .c .o .S .d
# Regenerate configure and Makefile automatically.
$(srcdir)/configure: configure.ac aclocal.m4
cd $(srcdir) && autoconf
$(srcdir)/config.h.in: stamp-h.in
$(srcdir)/stamp-h.in: configure.ac aclocal.m4
cd $(srcdir) && autoheader
echo timestamp > $(srcdir)/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
.PHONY: all install install-strip uninstall clean mostlyclean distclean
.PHONY: maintainer-clean info dvi dist check
# Prevent an overflow.
.NOEXPORT: