summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-03-21 23:22:18 +0000
committerThomas Schwinge <tschwinge@gnu.org>2009-06-18 00:26:36 +0200
commit65f1df2c51e9cff5bb3fbe5d571823e1a04a8039 (patch)
tree5909db52074330ef705fb082801db2bfc668ebcd
parentec9defc2912e86a7e682ec6e37aac102fa69d94d (diff)
2006-03-21 Thomas Schwinge <tschwinge@gnu.org>
* Makefile.in (clean): Also remove `kernel.gz', `kernel.stripped' and `kernel.stripped.gz'. * Makefile.in (kernel.o): Handle `$(systype)-objfiles-prepend'. * i386/Makefile.in (sysdep.a): Likewise. * i386/Makerules.in (kernel-objfiles-prepend): Transform variable into `$(systype)-objfiles-prepend'. (kernel.o): Remove target.
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.in10
-rw-r--r--i386/Makefile.in5
-rw-r--r--i386/Makerules.in6
4 files changed, 23 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index ac5bd2e..5276879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-03-21 Thomas Schwinge <tschwinge@gnu.org>
+
+ * Makefile.in (clean): Also remove `kernel.gz', `kernel.stripped' and
+ `kernel.stripped.gz'.
+
+ * Makefile.in (kernel.o): Handle `$(systype)-objfiles-prepend'.
+ * i386/Makefile.in (sysdep.a): Likewise.
+ * i386/Makerules.in (kernel-objfiles-prepend): Transform variable into
+ `$(systype)-objfiles-prepend'.
+ (kernel.o): Remove target.
+
2006-03-20 Thomas Schwinge <tschwinge@gnu.org>
* DEVELOPMENT: Document the NORMA removal.
diff --git a/Makefile.in b/Makefile.in
index aac5c74..648317b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -245,7 +245,8 @@ check: kernel
clean:
$(MAKE) -C $(systype) $@
- rm -f clib-routines.o kernel.o kernel kernel-undef kernel-undef-bad
+ rm -f clib-routines.o kernel.o kernel-undef kernel-undef-bad
+ rm -f kernel kernel.gz kernel.stripped kernel.stripped.gz
rm -f $(objfiles) $(subst .o,.d,$(objfiles))
rm -f *.symc *.symc.o *_user.c *_server.c *.h
rm -f *.migs_d *.migsh_d *.migu_d *.miguh_d
@@ -280,9 +281,12 @@ clib-routines := memcpy memmove memset bcopy bzero \
#kernel.a: $(objfiles)
# @rm -f $@
# $(AR) cq $@ $^
+
+# Then dependency on `$(systype)/sysdep.a' also makes sure that
+# `$($(systype)-objfiles-prepend)' are created.
kernel.o: $(objfiles) $(systype)/sysdep.a # kernel.a
- $(LD) -r -o $@ $(kernel-objfiles-prepend) \
- $(filter-out $(kernel-objfiles-prepend),$^)
+ $(LD) -r -o $@ \
+ $(addprefix $(systype)/,$($(systype)-objfiles-prepend)) $^
kernel-undef: kernel.o
$(NM) -u $< | sed 's/ *U *//;s/^_*//' | sort -u > $@
kernel-undef-bad: kernel-undef Makefile
diff --git a/i386/Makefile.in b/i386/Makefile.in
index d22a1aa..8aa62e4 100644
--- a/i386/Makefile.in
+++ b/i386/Makefile.in
@@ -131,10 +131,11 @@ INCLUDES = -I. -I$(srcdir)/i386at -I$(srcdir)/i386 \
all: sysdep.a
$(MAKE) -C linux $@
-# `boothdr.o' is special.
+# `$($(systype)-objfiles-prepend)' are special, but are nevertheless
+# created for the target `sysdep.a'.
sysdep.a: $(objfiles) linux/linux.o
rm -f $@
- $(AR) cr $@ $(filter-out boothdr.o,$^)
+ $(AR) cr $@ $(filter-out $($(systype)-objfiles-prepend),$^)
$(RANLIB) $@
check:
diff --git a/i386/Makerules.in b/i386/Makerules.in
index 1957e0f..f6c90da 100644
--- a/i386/Makerules.in
+++ b/i386/Makerules.in
@@ -33,10 +33,8 @@ DEFINES += -DCONTINUATIONS -D__ELF__ -Di386 $(DEFS-$(systype))
# Arrange for a suitable load address.
LDFLAGS-kernel += -Ttext 100000
-# `boothdr.o' has to be at the beginning.
-kernel-objfiles-prepend = $(systype)/boothdr.o
-
-kernel.o: $(kernel-objfiles-prepend)
+# `boothdr.o' has to be at the beginning of the kernel image.
+$(systype)-objfiles-prepend = boothdr.o
#