2008-08-15 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod and datehook.mod. (datetime_mod_SOURCES): New macro. (datetime_mod_CFLAGS): Likewise. (datetime_mod_LDFLAGS): Likewise. (date_mod_SOURCES): Likewise. (date_mod_CFLAGS): Likewise. (date_mod_LDFLAGS): Likewise. (datehook_mod_SOURCES): Likewise. (datehook_mod_CFLAGS): Likewise. (datehook_mod_LDFLAGS): Likewise. * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod and datehook.mod. (datetime_mod_SOURCES): New macro. (datetime_mod_CFLAGS): Likewise. (datetime_mod_LDFLAGS): Likewise. (date_mod_SOURCES): Likewise. (date_mod_CFLAGS): Likewise. (date_mod_LDFLAGS): Likewise. (datehook_mod_SOURCES): Likewise. (datehook_mod_CFLAGS): Likewise. (datehook_mod_LDFLAGS): Likewise. * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod and datehook.mod. (datetime_mod_SOURCES): New macro. (datetime_mod_CFLAGS): Likewise. (datetime_mod_LDFLAGS): Likewise. (date_mod_SOURCES): Likewise. (date_mod_CFLAGS): Likewise. (date_mod_LDFLAGS): Likewise. (datehook_mod_SOURCES): Likewise. (datehook_mod_CFLAGS): Likewise. (datehook_mod_LDFLAGS): Likewise. * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod and datehook.mod. (datetime_mod_SOURCES): New macro. (datetime_mod_CFLAGS): Likewise. (datetime_mod_LDFLAGS): Likewise. (date_mod_SOURCES): Likewise. (date_mod_CFLAGS): Likewise. (date_mod_LDFLAGS): Likewise. (datehook_mod_SOURCES): Likewise. (datehook_mod_CFLAGS): Likewise. (datehook_mod_LDFLAGS): Likewise. * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod and datehook.mod. (datetime_mod_SOURCES): New macro. (datetime_mod_CFLAGS): Likewise. (datetime_mod_LDFLAGS): Likewise. (date_mod_SOURCES): Likewise. (date_mod_CFLAGS): Likewise. (date_mod_LDFLAGS): Likewise. (datehook_mod_SOURCES): Likewise. (datehook_mod_CFLAGS): Likewise. (datehook_mod_LDFLAGS): Likewise. * kern/env.c (grub_env_insert): Fix a bug in prevp pointer. * commands/date.c: New file. * hook/datehook.c: Likewise. * include/grub/lib/datetime.h: Likewise. * include/grub/i386/cmos.h: Likewise. * lib/datetime.c: Likewise. * lib/i386/datetime.c: Likewise. * lib/efi/datetime.c: Likewise.
This commit is contained in:
parent
0e9242da3a
commit
42ce5170b7
21 changed files with 1799 additions and 86 deletions
|
@ -1,6 +1,30 @@
|
|||
# -*- makefile -*-
|
||||
# Generated by genmk.rb, please don't edit!
|
||||
|
||||
# For grub-mkelfimage.
|
||||
bin_UTILITIES += grub-mkelfimage
|
||||
grub_mkelfimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
|
||||
util/resolve.c
|
||||
CLEANFILES += grub-mkelfimage$(EXEEXT) grub_mkelfimage-util_elf_grub_mkimage.o grub_mkelfimage-util_misc.o grub_mkelfimage-util_resolve.o
|
||||
MOSTLYCLEANFILES += grub_mkelfimage-util_elf_grub_mkimage.d grub_mkelfimage-util_misc.d grub_mkelfimage-util_resolve.d
|
||||
|
||||
grub-mkelfimage: $(grub_mkelfimage_DEPENDENCIES) grub_mkelfimage-util_elf_grub_mkimage.o grub_mkelfimage-util_misc.o grub_mkelfimage-util_resolve.o
|
||||
$(CC) -o $@ grub_mkelfimage-util_elf_grub_mkimage.o grub_mkelfimage-util_misc.o grub_mkelfimage-util_resolve.o $(LDFLAGS) $(grub_mkelfimage_LDFLAGS)
|
||||
|
||||
grub_mkelfimage-util_elf_grub_mkimage.o: util/elf/grub-mkimage.c $(util/elf/grub-mkimage.c_DEPENDENCIES)
|
||||
$(CC) -Iutil/elf -I$(srcdir)/util/elf $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkelfimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkelfimage-util_elf_grub_mkimage.d
|
||||
|
||||
grub_mkelfimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkelfimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkelfimage-util_misc.d
|
||||
|
||||
grub_mkelfimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkelfimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkelfimage-util_resolve.d
|
||||
|
||||
util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||
|
||||
# For grub-probe.
|
||||
sbin_UTILITIES += grub-probe
|
||||
util/grub-probe.c_DEPENDENCIES = grub_probe_init.h
|
||||
|
|
|
@ -164,36 +164,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genke
|
|||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||
|
||||
# Utilities.
|
||||
bin_UTILITIES = grub-mkimage
|
||||
sbin_UTILITIES = grub-mkdevicemap
|
||||
ifeq ($(enable_grub_emu), yes)
|
||||
sbin_UTILITIES += grub-emu
|
||||
endif
|
||||
|
||||
# For grub-mkimage.
|
||||
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
|
||||
util/resolve.c
|
||||
CLEANFILES += grub-mkimage$(EXEEXT) grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
|
||||
MOSTLYCLEANFILES += grub_mkimage-util_elf_grub_mkimage.d grub_mkimage-util_misc.d grub_mkimage-util_resolve.d
|
||||
|
||||
grub-mkimage: $(grub_mkimage_DEPENDENCIES) grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
|
||||
$(CC) -o $@ grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o $(LDFLAGS) $(grub_mkimage_LDFLAGS)
|
||||
|
||||
grub_mkimage-util_elf_grub_mkimage.o: util/elf/grub-mkimage.c $(util/elf/grub-mkimage.c_DEPENDENCIES)
|
||||
$(CC) -Iutil/elf -I$(srcdir)/util/elf $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_elf_grub_mkimage.d
|
||||
|
||||
grub_mkimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_misc.d
|
||||
|
||||
grub_mkimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_resolve.d
|
||||
|
||||
grub_mkimage_LDFLAGS = $(LIBLZO)
|
||||
util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||
|
||||
# For grub-mkdevicemap.
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
||||
util/i386/get_disk_name.c
|
||||
|
@ -583,7 +558,7 @@ pkglib_MODULES = _linux.mod linux.mod normal.mod \
|
|||
_multiboot.mod multiboot.mod aout.mod \
|
||||
play.mod cpuid.mod serial.mod ata.mod \
|
||||
memdisk.mod pci.mod lspci.mod reboot.mod \
|
||||
halt.mod
|
||||
halt.mod datetime.mod date.mod datehook.mod
|
||||
|
||||
# For _linux.mod.
|
||||
_linux_mod_SOURCES = loader/i386/pc/linux.c
|
||||
|
@ -1809,4 +1784,194 @@ partmap-lspci_mod-commands_lspci.lst: commands/lspci.c $(commands/lspci.c_DEPEND
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
|
||||
CLEANFILES += datetime.mod mod-datetime.o mod-datetime.c pre-datetime.o datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o und-datetime.lst
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datetime.lst
|
||||
DEFSYMFILES += def-datetime.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datetime_mod-lib_datetime.d datetime_mod-lib_i386_datetime.d
|
||||
UNDSYMFILES += und-datetime.lst
|
||||
|
||||
datetime.mod: pre-datetime.o mod-datetime.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datetime.o mod-datetime.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datetime.o: $(datetime_mod_DEPENDENCIES) datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o
|
||||
|
||||
mod-datetime.o: mod-datetime.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datetime.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datetime' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
def-datetime.lst: pre-datetime.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datetime/' > $@
|
||||
endif
|
||||
|
||||
und-datetime.lst: pre-datetime.o
|
||||
echo 'datetime' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datetime_mod-lib_datetime.o: lib/datetime.c $(lib/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_datetime.lst fs-datetime_mod-lib_datetime.lst partmap-datetime_mod-lib_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod-lib_i386_datetime.o: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_i386_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_i386_datetime.lst fs-datetime_mod-lib_i386_datetime.lst partmap-datetime_mod-lib_i386_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_i386_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_i386_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_i386_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
CLEANFILES += date.mod mod-date.o mod-date.c pre-date.o date_mod-commands_date.o und-date.lst
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
CLEANFILES += def-date.lst
|
||||
DEFSYMFILES += def-date.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += date_mod-commands_date.d
|
||||
UNDSYMFILES += und-date.lst
|
||||
|
||||
date.mod: pre-date.o mod-date.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-date.o mod-date.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-date.o: $(date_mod_DEPENDENCIES) date_mod-commands_date.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ date_mod-commands_date.o
|
||||
|
||||
mod-date.o: mod-date.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-date.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'date' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
def-date.lst: pre-date.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 date/' > $@
|
||||
endif
|
||||
|
||||
und-date.lst: pre-date.o
|
||||
echo 'date' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
date_mod-commands_date.o: commands/date.c $(commands/date.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include date_mod-commands_date.d
|
||||
|
||||
CLEANFILES += cmd-date_mod-commands_date.lst fs-date_mod-commands_date.lst partmap-date_mod-commands_date.lst
|
||||
COMMANDFILES += cmd-date_mod-commands_date.lst
|
||||
FSFILES += fs-date_mod-commands_date.lst
|
||||
PARTMAPFILES += partmap-date_mod-commands_date.lst
|
||||
|
||||
cmd-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
CLEANFILES += datehook.mod mod-datehook.o mod-datehook.c pre-datehook.o datehook_mod-hook_datehook.o und-datehook.lst
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datehook.lst
|
||||
DEFSYMFILES += def-datehook.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datehook_mod-hook_datehook.d
|
||||
UNDSYMFILES += und-datehook.lst
|
||||
|
||||
datehook.mod: pre-datehook.o mod-datehook.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datehook.o mod-datehook.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datehook.o: $(datehook_mod_DEPENDENCIES) datehook_mod-hook_datehook.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datehook_mod-hook_datehook.o
|
||||
|
||||
mod-datehook.o: mod-datehook.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datehook.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datehook' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
def-datehook.lst: pre-datehook.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datehook/' > $@
|
||||
endif
|
||||
|
||||
und-datehook.lst: pre-datehook.o
|
||||
echo 'datehook' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datehook_mod-hook_datehook.o: hook/datehook.c $(hook/datehook.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datehook_mod-hook_datehook.d
|
||||
|
||||
CLEANFILES += cmd-datehook_mod-hook_datehook.lst fs-datehook_mod-hook_datehook.lst partmap-datehook_mod-hook_datehook.lst
|
||||
COMMANDFILES += cmd-datehook_mod-hook_datehook.lst
|
||||
FSFILES += fs-datehook_mod-hook_datehook.lst
|
||||
PARTMAPFILES += partmap-datehook_mod-hook_datehook.lst
|
||||
|
||||
cmd-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -95,7 +95,7 @@ pkglib_MODULES = _linux.mod linux.mod normal.mod \
|
|||
_multiboot.mod multiboot.mod aout.mod \
|
||||
play.mod cpuid.mod serial.mod ata.mod \
|
||||
memdisk.mod pci.mod lspci.mod reboot.mod \
|
||||
halt.mod
|
||||
halt.mod datetime.mod date.mod datehook.mod
|
||||
|
||||
# For _linux.mod.
|
||||
_linux_mod_SOURCES = loader/i386/pc/linux.c
|
||||
|
@ -180,4 +180,19 @@ lspci_mod_SOURCES = commands/lspci.c
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
193
conf/i386-efi.mk
193
conf/i386-efi.mk
|
@ -118,7 +118,8 @@ grub-install: util/i386/efi/grub-install.in $(util/i386/efi/grub-install.in_DEPE
|
|||
|
||||
# Modules.
|
||||
pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
|
||||
_linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod
|
||||
_linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod \
|
||||
datetime.mod date.mod datehook.mod
|
||||
|
||||
# For kernel.mod.
|
||||
kernel_mod_EXPORTS = no
|
||||
|
@ -1632,4 +1633,194 @@ partmap-lspci_mod-commands_lspci.lst: commands/lspci.c $(commands/lspci.c_DEPEND
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c
|
||||
CLEANFILES += datetime.mod mod-datetime.o mod-datetime.c pre-datetime.o datetime_mod-lib_datetime.o datetime_mod-lib_efi_datetime.o und-datetime.lst
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datetime.lst
|
||||
DEFSYMFILES += def-datetime.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datetime_mod-lib_datetime.d datetime_mod-lib_efi_datetime.d
|
||||
UNDSYMFILES += und-datetime.lst
|
||||
|
||||
datetime.mod: pre-datetime.o mod-datetime.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datetime.o mod-datetime.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datetime.o: $(datetime_mod_DEPENDENCIES) datetime_mod-lib_datetime.o datetime_mod-lib_efi_datetime.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datetime_mod-lib_datetime.o datetime_mod-lib_efi_datetime.o
|
||||
|
||||
mod-datetime.o: mod-datetime.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datetime.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datetime' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
def-datetime.lst: pre-datetime.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datetime/' > $@
|
||||
endif
|
||||
|
||||
und-datetime.lst: pre-datetime.o
|
||||
echo 'datetime' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datetime_mod-lib_datetime.o: lib/datetime.c $(lib/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_datetime.lst fs-datetime_mod-lib_datetime.lst partmap-datetime_mod-lib_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod-lib_efi_datetime.o: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_efi_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_efi_datetime.lst fs-datetime_mod-lib_efi_datetime.lst partmap-datetime_mod-lib_efi_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_efi_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_efi_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_efi_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_efi_datetime.lst: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_efi_datetime.lst: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_efi_datetime.lst: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
CLEANFILES += date.mod mod-date.o mod-date.c pre-date.o date_mod-commands_date.o und-date.lst
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
CLEANFILES += def-date.lst
|
||||
DEFSYMFILES += def-date.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += date_mod-commands_date.d
|
||||
UNDSYMFILES += und-date.lst
|
||||
|
||||
date.mod: pre-date.o mod-date.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-date.o mod-date.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-date.o: $(date_mod_DEPENDENCIES) date_mod-commands_date.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ date_mod-commands_date.o
|
||||
|
||||
mod-date.o: mod-date.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-date.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'date' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
def-date.lst: pre-date.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 date/' > $@
|
||||
endif
|
||||
|
||||
und-date.lst: pre-date.o
|
||||
echo 'date' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
date_mod-commands_date.o: commands/date.c $(commands/date.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include date_mod-commands_date.d
|
||||
|
||||
CLEANFILES += cmd-date_mod-commands_date.lst fs-date_mod-commands_date.lst partmap-date_mod-commands_date.lst
|
||||
COMMANDFILES += cmd-date_mod-commands_date.lst
|
||||
FSFILES += fs-date_mod-commands_date.lst
|
||||
PARTMAPFILES += partmap-date_mod-commands_date.lst
|
||||
|
||||
cmd-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
CLEANFILES += datehook.mod mod-datehook.o mod-datehook.c pre-datehook.o datehook_mod-hook_datehook.o und-datehook.lst
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datehook.lst
|
||||
DEFSYMFILES += def-datehook.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datehook_mod-hook_datehook.d
|
||||
UNDSYMFILES += und-datehook.lst
|
||||
|
||||
datehook.mod: pre-datehook.o mod-datehook.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datehook.o mod-datehook.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datehook.o: $(datehook_mod_DEPENDENCIES) datehook_mod-hook_datehook.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datehook_mod-hook_datehook.o
|
||||
|
||||
mod-datehook.o: mod-datehook.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datehook.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datehook' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
def-datehook.lst: pre-datehook.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datehook/' > $@
|
||||
endif
|
||||
|
||||
und-datehook.lst: pre-datehook.o
|
||||
echo 'datehook' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datehook_mod-hook_datehook.o: hook/datehook.c $(hook/datehook.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datehook_mod-hook_datehook.d
|
||||
|
||||
CLEANFILES += cmd-datehook_mod-hook_datehook.lst fs-datehook_mod-hook_datehook.lst partmap-datehook_mod-hook_datehook.lst
|
||||
COMMANDFILES += cmd-datehook_mod-hook_datehook.lst
|
||||
FSFILES += fs-datehook_mod-hook_datehook.lst
|
||||
PARTMAPFILES += partmap-datehook_mod-hook_datehook.lst
|
||||
|
||||
cmd-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -75,7 +75,8 @@ grub_install_SOURCES = util/i386/efi/grub-install.in
|
|||
|
||||
# Modules.
|
||||
pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
|
||||
_linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod
|
||||
_linux.mod linux.mod cpuid.mod halt.mod reboot.mod pci.mod lspci.mod \
|
||||
datetime.mod date.mod datehook.mod
|
||||
|
||||
# For kernel.mod.
|
||||
kernel_mod_EXPORTS = no
|
||||
|
@ -167,4 +168,19 @@ lspci_mod_SOURCES = commands/lspci.c
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -161,36 +161,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genke
|
|||
/bin/sh genkernsyms.sh $(filter %.h,$^) > $@ || (rm -f $@; exit 1)
|
||||
|
||||
# Utilities.
|
||||
bin_UTILITIES = grub-mkimage
|
||||
sbin_UTILITIES = grub-mkdevicemap
|
||||
ifeq ($(enable_grub_emu), yes)
|
||||
sbin_UTILITIES += grub-emu
|
||||
endif
|
||||
|
||||
# For grub-mkimage.
|
||||
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
|
||||
util/resolve.c
|
||||
CLEANFILES += grub-mkimage$(EXEEXT) grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
|
||||
MOSTLYCLEANFILES += grub_mkimage-util_elf_grub_mkimage.d grub_mkimage-util_misc.d grub_mkimage-util_resolve.d
|
||||
|
||||
grub-mkimage: $(grub_mkimage_DEPENDENCIES) grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
|
||||
$(CC) -o $@ grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o $(LDFLAGS) $(grub_mkimage_LDFLAGS)
|
||||
|
||||
grub_mkimage-util_elf_grub_mkimage.o: util/elf/grub-mkimage.c $(util/elf/grub-mkimage.c_DEPENDENCIES)
|
||||
$(CC) -Iutil/elf -I$(srcdir)/util/elf $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_elf_grub_mkimage.d
|
||||
|
||||
grub_mkimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_misc.d
|
||||
|
||||
grub_mkimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_resolve.d
|
||||
|
||||
grub_mkimage_LDFLAGS = $(LIBLZO)
|
||||
util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||
|
||||
# For grub-mkdevicemap.
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
||||
util/i386/get_disk_name.c
|
||||
|
@ -599,7 +574,8 @@ grub-install: util/ieee1275/grub-install.in $(util/ieee1275/grub-install.in_DEPE
|
|||
# Modules.
|
||||
pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod cpuid.mod \
|
||||
multiboot.mod _multiboot.mod aout.mod serial.mod linux.mod \
|
||||
_linux.mod nand.mod memdisk.mod pci.mod lspci.mod
|
||||
_linux.mod nand.mod memdisk.mod pci.mod lspci.mod datetime.mod \
|
||||
date.mod datehook.mod
|
||||
|
||||
# For normal.mod.
|
||||
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
||||
|
@ -1767,4 +1743,194 @@ partmap-lspci_mod-commands_lspci.lst: commands/lspci.c $(commands/lspci.c_DEPEND
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
|
||||
CLEANFILES += datetime.mod mod-datetime.o mod-datetime.c pre-datetime.o datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o und-datetime.lst
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datetime.lst
|
||||
DEFSYMFILES += def-datetime.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datetime_mod-lib_datetime.d datetime_mod-lib_i386_datetime.d
|
||||
UNDSYMFILES += und-datetime.lst
|
||||
|
||||
datetime.mod: pre-datetime.o mod-datetime.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datetime.o mod-datetime.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datetime.o: $(datetime_mod_DEPENDENCIES) datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o
|
||||
|
||||
mod-datetime.o: mod-datetime.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datetime.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datetime' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
def-datetime.lst: pre-datetime.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datetime/' > $@
|
||||
endif
|
||||
|
||||
und-datetime.lst: pre-datetime.o
|
||||
echo 'datetime' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datetime_mod-lib_datetime.o: lib/datetime.c $(lib/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_datetime.lst fs-datetime_mod-lib_datetime.lst partmap-datetime_mod-lib_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod-lib_i386_datetime.o: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_i386_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_i386_datetime.lst fs-datetime_mod-lib_i386_datetime.lst partmap-datetime_mod-lib_i386_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_i386_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_i386_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_i386_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
CLEANFILES += date.mod mod-date.o mod-date.c pre-date.o date_mod-commands_date.o und-date.lst
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
CLEANFILES += def-date.lst
|
||||
DEFSYMFILES += def-date.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += date_mod-commands_date.d
|
||||
UNDSYMFILES += und-date.lst
|
||||
|
||||
date.mod: pre-date.o mod-date.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-date.o mod-date.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-date.o: $(date_mod_DEPENDENCIES) date_mod-commands_date.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ date_mod-commands_date.o
|
||||
|
||||
mod-date.o: mod-date.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-date.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'date' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
def-date.lst: pre-date.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 date/' > $@
|
||||
endif
|
||||
|
||||
und-date.lst: pre-date.o
|
||||
echo 'date' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
date_mod-commands_date.o: commands/date.c $(commands/date.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include date_mod-commands_date.d
|
||||
|
||||
CLEANFILES += cmd-date_mod-commands_date.lst fs-date_mod-commands_date.lst partmap-date_mod-commands_date.lst
|
||||
COMMANDFILES += cmd-date_mod-commands_date.lst
|
||||
FSFILES += fs-date_mod-commands_date.lst
|
||||
PARTMAPFILES += partmap-date_mod-commands_date.lst
|
||||
|
||||
cmd-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
CLEANFILES += datehook.mod mod-datehook.o mod-datehook.c pre-datehook.o datehook_mod-hook_datehook.o und-datehook.lst
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datehook.lst
|
||||
DEFSYMFILES += def-datehook.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datehook_mod-hook_datehook.d
|
||||
UNDSYMFILES += und-datehook.lst
|
||||
|
||||
datehook.mod: pre-datehook.o mod-datehook.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datehook.o mod-datehook.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datehook.o: $(datehook_mod_DEPENDENCIES) datehook_mod-hook_datehook.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datehook_mod-hook_datehook.o
|
||||
|
||||
mod-datehook.o: mod-datehook.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datehook.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datehook' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
def-datehook.lst: pre-datehook.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datehook/' > $@
|
||||
endif
|
||||
|
||||
und-datehook.lst: pre-datehook.o
|
||||
echo 'datehook' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datehook_mod-hook_datehook.o: hook/datehook.c $(hook/datehook.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datehook_mod-hook_datehook.d
|
||||
|
||||
CLEANFILES += cmd-datehook_mod-hook_datehook.lst fs-datehook_mod-hook_datehook.lst partmap-datehook_mod-hook_datehook.lst
|
||||
COMMANDFILES += cmd-datehook_mod-hook_datehook.lst
|
||||
FSFILES += fs-datehook_mod-hook_datehook.lst
|
||||
PARTMAPFILES += partmap-datehook_mod-hook_datehook.lst
|
||||
|
||||
cmd-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -97,7 +97,8 @@ grub_install_SOURCES = util/ieee1275/grub-install.in
|
|||
# Modules.
|
||||
pkglib_MODULES = normal.mod halt.mod reboot.mod suspend.mod cpuid.mod \
|
||||
multiboot.mod _multiboot.mod aout.mod serial.mod linux.mod \
|
||||
_linux.mod nand.mod memdisk.mod pci.mod lspci.mod
|
||||
_linux.mod nand.mod memdisk.mod pci.mod lspci.mod datetime.mod \
|
||||
date.mod datehook.mod
|
||||
|
||||
# For normal.mod.
|
||||
normal_mod_SOURCES = normal/arg.c normal/cmdline.c normal/command.c \
|
||||
|
@ -181,4 +182,19 @@ lspci_mod_SOURCES = commands/lspci.c
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
193
conf/i386-pc.mk
193
conf/i386-pc.mk
|
@ -904,7 +904,8 @@ pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.mod \
|
|||
vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
|
||||
videotest.mod play.mod bitmap.mod tga.mod cpuid.mod serial.mod \
|
||||
ata.mod vga.mod memdisk.mod jpeg.mod png.mod pci.mod lspci.mod \
|
||||
aout.mod _bsd.mod bsd.mod pxe.mod pxecmd.mod
|
||||
aout.mod _bsd.mod bsd.mod pxe.mod pxecmd.mod datetime.mod date.mod \
|
||||
datehook.mod
|
||||
|
||||
# For biosdisk.mod.
|
||||
biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
|
||||
|
@ -3177,4 +3178,194 @@ partmap-pxecmd_mod-commands_i386_pc_pxecmd.lst: commands/i386/pc/pxecmd.c $(comm
|
|||
pxecmd_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
pxecmd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
|
||||
CLEANFILES += datetime.mod mod-datetime.o mod-datetime.c pre-datetime.o datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o und-datetime.lst
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datetime.lst
|
||||
DEFSYMFILES += def-datetime.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datetime_mod-lib_datetime.d datetime_mod-lib_i386_datetime.d
|
||||
UNDSYMFILES += und-datetime.lst
|
||||
|
||||
datetime.mod: pre-datetime.o mod-datetime.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datetime.o mod-datetime.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datetime.o: $(datetime_mod_DEPENDENCIES) datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datetime_mod-lib_datetime.o datetime_mod-lib_i386_datetime.o
|
||||
|
||||
mod-datetime.o: mod-datetime.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datetime.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datetime' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
def-datetime.lst: pre-datetime.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datetime/' > $@
|
||||
endif
|
||||
|
||||
und-datetime.lst: pre-datetime.o
|
||||
echo 'datetime' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datetime_mod-lib_datetime.o: lib/datetime.c $(lib/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_datetime.lst fs-datetime_mod-lib_datetime.lst partmap-datetime_mod-lib_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod-lib_i386_datetime.o: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_i386_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_i386_datetime.lst fs-datetime_mod-lib_i386_datetime.lst partmap-datetime_mod-lib_i386_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_i386_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_i386_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_i386_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_i386_datetime.lst: lib/i386/datetime.c $(lib/i386/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/i386 -I$(srcdir)/lib/i386 $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
CLEANFILES += date.mod mod-date.o mod-date.c pre-date.o date_mod-commands_date.o und-date.lst
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
CLEANFILES += def-date.lst
|
||||
DEFSYMFILES += def-date.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += date_mod-commands_date.d
|
||||
UNDSYMFILES += und-date.lst
|
||||
|
||||
date.mod: pre-date.o mod-date.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-date.o mod-date.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-date.o: $(date_mod_DEPENDENCIES) date_mod-commands_date.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ date_mod-commands_date.o
|
||||
|
||||
mod-date.o: mod-date.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-date.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'date' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
def-date.lst: pre-date.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 date/' > $@
|
||||
endif
|
||||
|
||||
und-date.lst: pre-date.o
|
||||
echo 'date' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
date_mod-commands_date.o: commands/date.c $(commands/date.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include date_mod-commands_date.d
|
||||
|
||||
CLEANFILES += cmd-date_mod-commands_date.lst fs-date_mod-commands_date.lst partmap-date_mod-commands_date.lst
|
||||
COMMANDFILES += cmd-date_mod-commands_date.lst
|
||||
FSFILES += fs-date_mod-commands_date.lst
|
||||
PARTMAPFILES += partmap-date_mod-commands_date.lst
|
||||
|
||||
cmd-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
CLEANFILES += datehook.mod mod-datehook.o mod-datehook.c pre-datehook.o datehook_mod-hook_datehook.o und-datehook.lst
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datehook.lst
|
||||
DEFSYMFILES += def-datehook.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datehook_mod-hook_datehook.d
|
||||
UNDSYMFILES += und-datehook.lst
|
||||
|
||||
datehook.mod: pre-datehook.o mod-datehook.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datehook.o mod-datehook.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datehook.o: $(datehook_mod_DEPENDENCIES) datehook_mod-hook_datehook.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datehook_mod-hook_datehook.o
|
||||
|
||||
mod-datehook.o: mod-datehook.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datehook.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datehook' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
def-datehook.lst: pre-datehook.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datehook/' > $@
|
||||
endif
|
||||
|
||||
und-datehook.lst: pre-datehook.o
|
||||
echo 'datehook' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datehook_mod-hook_datehook.o: hook/datehook.c $(hook/datehook.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datehook_mod-hook_datehook.d
|
||||
|
||||
CLEANFILES += cmd-datehook_mod-hook_datehook.lst fs-datehook_mod-hook_datehook.lst partmap-datehook_mod-hook_datehook.lst
|
||||
COMMANDFILES += cmd-datehook_mod-hook_datehook.lst
|
||||
FSFILES += fs-datehook_mod-hook_datehook.lst
|
||||
PARTMAPFILES += partmap-datehook_mod-hook_datehook.lst
|
||||
|
||||
cmd-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -163,7 +163,8 @@ pkglib_MODULES = biosdisk.mod _chain.mod _linux.mod linux.mod normal.mod \
|
|||
vbe.mod vbetest.mod vbeinfo.mod video.mod gfxterm.mod \
|
||||
videotest.mod play.mod bitmap.mod tga.mod cpuid.mod serial.mod \
|
||||
ata.mod vga.mod memdisk.mod jpeg.mod png.mod pci.mod lspci.mod \
|
||||
aout.mod _bsd.mod bsd.mod pxe.mod pxecmd.mod
|
||||
aout.mod _bsd.mod bsd.mod pxe.mod pxecmd.mod datetime.mod date.mod \
|
||||
datehook.mod
|
||||
|
||||
# For biosdisk.mod.
|
||||
biosdisk_mod_SOURCES = disk/i386/pc/biosdisk.c
|
||||
|
@ -340,4 +341,19 @@ pxecmd_mod_SOURCES = commands/i386/pc/pxecmd.c
|
|||
pxecmd_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
pxecmd_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/i386/datetime.c
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -29,35 +29,11 @@ kernel_syms.lst: $(addprefix include/grub/,$(kernel_elf_HEADERS)) config.h genke
|
|||
pkglib_PROGRAMS = kernel.elf
|
||||
|
||||
# Utilities.
|
||||
bin_UTILITIES = grub-mkimage
|
||||
sbin_UTILITIES = grub-mkdevicemap
|
||||
ifeq ($(enable_grub_emu), yes)
|
||||
sbin_UTILITIES += grub-emu
|
||||
endif
|
||||
|
||||
# For grub-mkimage.
|
||||
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
|
||||
util/resolve.c
|
||||
CLEANFILES += grub-mkimage$(EXEEXT) grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
|
||||
MOSTLYCLEANFILES += grub_mkimage-util_elf_grub_mkimage.d grub_mkimage-util_misc.d grub_mkimage-util_resolve.d
|
||||
|
||||
grub-mkimage: $(grub_mkimage_DEPENDENCIES) grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o
|
||||
$(CC) -o $@ grub_mkimage-util_elf_grub_mkimage.o grub_mkimage-util_misc.o grub_mkimage-util_resolve.o $(LDFLAGS) $(grub_mkimage_LDFLAGS)
|
||||
|
||||
grub_mkimage-util_elf_grub_mkimage.o: util/elf/grub-mkimage.c $(util/elf/grub-mkimage.c_DEPENDENCIES)
|
||||
$(CC) -Iutil/elf -I$(srcdir)/util/elf $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_elf_grub_mkimage.d
|
||||
|
||||
grub_mkimage-util_misc.o: util/misc.c $(util/misc.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_misc.d
|
||||
|
||||
grub_mkimage-util_resolve.o: util/resolve.c $(util/resolve.c_DEPENDENCIES)
|
||||
$(CC) -Iutil -I$(srcdir)/util $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(grub_mkimage_CFLAGS) -MD -c -o $@ $<
|
||||
-include grub_mkimage-util_resolve.d
|
||||
|
||||
util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
|
||||
|
||||
# For grub-mkdevicemap.
|
||||
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
|
||||
util/ieee1275/get_disk_name.c
|
||||
|
|
|
@ -102,7 +102,8 @@ grub-install: util/i386/efi/grub-install.in $(util/i386/efi/grub-install.in_DEPE
|
|||
|
||||
# Modules.
|
||||
pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
|
||||
cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod
|
||||
cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \
|
||||
datetime.mod date.mod datehook.mod
|
||||
|
||||
# For kernel.mod.
|
||||
kernel_mod_EXPORTS = no
|
||||
|
@ -1635,4 +1636,194 @@ partmap-lspci_mod-commands_lspci.lst: commands/lspci.c $(commands/lspci.c_DEPEND
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c
|
||||
CLEANFILES += datetime.mod mod-datetime.o mod-datetime.c pre-datetime.o datetime_mod-lib_datetime.o datetime_mod-lib_efi_datetime.o und-datetime.lst
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datetime.lst
|
||||
DEFSYMFILES += def-datetime.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datetime_mod-lib_datetime.d datetime_mod-lib_efi_datetime.d
|
||||
UNDSYMFILES += und-datetime.lst
|
||||
|
||||
datetime.mod: pre-datetime.o mod-datetime.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datetime.o mod-datetime.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datetime.o: $(datetime_mod_DEPENDENCIES) datetime_mod-lib_datetime.o datetime_mod-lib_efi_datetime.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datetime_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datetime_mod-lib_datetime.o datetime_mod-lib_efi_datetime.o
|
||||
|
||||
mod-datetime.o: mod-datetime.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datetime.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datetime' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datetime_mod_EXPORTS),no)
|
||||
def-datetime.lst: pre-datetime.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datetime/' > $@
|
||||
endif
|
||||
|
||||
und-datetime.lst: pre-datetime.o
|
||||
echo 'datetime' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datetime_mod-lib_datetime.o: lib/datetime.c $(lib/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_datetime.lst fs-datetime_mod-lib_datetime.lst partmap-datetime_mod-lib_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_datetime.lst: lib/datetime.c $(lib/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib -I$(srcdir)/lib $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod-lib_efi_datetime.o: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datetime_mod-lib_efi_datetime.d
|
||||
|
||||
CLEANFILES += cmd-datetime_mod-lib_efi_datetime.lst fs-datetime_mod-lib_efi_datetime.lst partmap-datetime_mod-lib_efi_datetime.lst
|
||||
COMMANDFILES += cmd-datetime_mod-lib_efi_datetime.lst
|
||||
FSFILES += fs-datetime_mod-lib_efi_datetime.lst
|
||||
PARTMAPFILES += partmap-datetime_mod-lib_efi_datetime.lst
|
||||
|
||||
cmd-datetime_mod-lib_efi_datetime.lst: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datetime_mod-lib_efi_datetime.lst: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datetime_mod-lib_efi_datetime.lst: lib/efi/datetime.c $(lib/efi/datetime.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ilib/efi -I$(srcdir)/lib/efi $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datetime_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datetime > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
CLEANFILES += date.mod mod-date.o mod-date.c pre-date.o date_mod-commands_date.o und-date.lst
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
CLEANFILES += def-date.lst
|
||||
DEFSYMFILES += def-date.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += date_mod-commands_date.d
|
||||
UNDSYMFILES += und-date.lst
|
||||
|
||||
date.mod: pre-date.o mod-date.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-date.o mod-date.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-date.o: $(date_mod_DEPENDENCIES) date_mod-commands_date.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(date_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ date_mod-commands_date.o
|
||||
|
||||
mod-date.o: mod-date.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-date.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'date' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(date_mod_EXPORTS),no)
|
||||
def-date.lst: pre-date.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 date/' > $@
|
||||
endif
|
||||
|
||||
und-date.lst: pre-date.o
|
||||
echo 'date' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
date_mod-commands_date.o: commands/date.c $(commands/date.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include date_mod-commands_date.d
|
||||
|
||||
CLEANFILES += cmd-date_mod-commands_date.lst fs-date_mod-commands_date.lst partmap-date_mod-commands_date.lst
|
||||
COMMANDFILES += cmd-date_mod-commands_date.lst
|
||||
FSFILES += fs-date_mod-commands_date.lst
|
||||
PARTMAPFILES += partmap-date_mod-commands_date.lst
|
||||
|
||||
cmd-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-date_mod-commands_date.lst: commands/date.c $(commands/date.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Icommands -I$(srcdir)/commands $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(date_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh date > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
CLEANFILES += datehook.mod mod-datehook.o mod-datehook.c pre-datehook.o datehook_mod-hook_datehook.o und-datehook.lst
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
CLEANFILES += def-datehook.lst
|
||||
DEFSYMFILES += def-datehook.lst
|
||||
endif
|
||||
MOSTLYCLEANFILES += datehook_mod-hook_datehook.d
|
||||
UNDSYMFILES += und-datehook.lst
|
||||
|
||||
datehook.mod: pre-datehook.o mod-datehook.o $(TARGET_OBJ2ELF)
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) $(MODULE_LDFLAGS) -Wl,-r,-d -o $@ pre-datehook.o mod-datehook.o
|
||||
if test ! -z $(TARGET_OBJ2ELF); then ./$(TARGET_OBJ2ELF) $@ || (rm -f $@; exit 1); fi
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -K _grub_mod_init -K _grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
pre-datehook.o: $(datehook_mod_DEPENDENCIES) datehook_mod-hook_datehook.o
|
||||
-rm -f $@
|
||||
$(TARGET_CC) $(datehook_mod_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ datehook_mod-hook_datehook.o
|
||||
|
||||
mod-datehook.o: mod-datehook.c
|
||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -c -o $@ $<
|
||||
|
||||
mod-datehook.c: moddep.lst genmodsrc.sh
|
||||
sh $(srcdir)/genmodsrc.sh 'datehook' $< > $@ || (rm -f $@; exit 1)
|
||||
|
||||
ifneq ($(datehook_mod_EXPORTS),no)
|
||||
def-datehook.lst: pre-datehook.o
|
||||
$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 datehook/' > $@
|
||||
endif
|
||||
|
||||
und-datehook.lst: pre-datehook.o
|
||||
echo 'datehook' > $@
|
||||
$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
|
||||
|
||||
datehook_mod-hook_datehook.o: hook/datehook.c $(hook/datehook.c_DEPENDENCIES)
|
||||
$(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -MD -c -o $@ $<
|
||||
-include datehook_mod-hook_datehook.d
|
||||
|
||||
CLEANFILES += cmd-datehook_mod-hook_datehook.lst fs-datehook_mod-hook_datehook.lst partmap-datehook_mod-hook_datehook.lst
|
||||
COMMANDFILES += cmd-datehook_mod-hook_datehook.lst
|
||||
FSFILES += fs-datehook_mod-hook_datehook.lst
|
||||
PARTMAPFILES += partmap-datehook_mod-hook_datehook.lst
|
||||
|
||||
cmd-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) gencmdlist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/gencmdlist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
fs-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genfslist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genfslist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
partmap-datehook_mod-hook_datehook.lst: hook/datehook.c $(hook/datehook.c_DEPENDENCIES) genpartmaplist.sh
|
||||
set -e; $(TARGET_CC) -Ihook -I$(srcdir)/hook $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(datehook_mod_CFLAGS) -E $< | sh $(srcdir)/genpartmaplist.sh datehook > $@ || (rm -f $@; exit 1)
|
||||
|
||||
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
|
@ -77,7 +77,8 @@ grub_install_SOURCES = util/i386/efi/grub-install.in
|
|||
|
||||
# Modules.
|
||||
pkglib_MODULES = kernel.mod normal.mod _chain.mod chain.mod appleldr.mod \
|
||||
cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod
|
||||
cpuid.mod halt.mod reboot.mod _linux.mod linux.mod pci.mod lspci.mod \
|
||||
datetime.mod date.mod datehook.mod
|
||||
|
||||
# For kernel.mod.
|
||||
kernel_mod_EXPORTS = no
|
||||
|
@ -169,4 +170,19 @@ lspci_mod_SOURCES = commands/lspci.c
|
|||
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datetime.mod
|
||||
datetime_mod_SOURCES = lib/datetime.c lib/efi/datetime.c
|
||||
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For date.mod
|
||||
date_mod_SOURCES = commands/date.c
|
||||
date_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
date_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
# For datehook.mod
|
||||
datehook_mod_SOURCES = hook/datehook.c
|
||||
datehook_mod_CFLAGS = $(COMMON_CFLAGS)
|
||||
datehook_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
||||
|
||||
include $(srcdir)/conf/common.mk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue