]> git.hungrycats.org Git - linux/commitdiff
kbuild: Make O_TARGET default to 'built-in.o'
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Fri, 24 May 2002 12:12:37 +0000 (07:12 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Fri, 24 May 2002 12:12:37 +0000 (07:12 -0500)
If a Makefile defines neither O_TARGET nor L_TARGET, let's assume a
default of 'built-in.o'. The goal of this is, of course, to eventually
get rid of O_TARGET completely.

Rules.make

index c335f8cf5592321a6358240cbfaadd94f3dd7b76..d4c624a2982c642456e82559515780eefddbc51a 100644 (file)
@@ -144,14 +144,25 @@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $<
 %.o: %.S dummy
        $(call if_changed,cmd_as_o_S)
 
-# ---------------------------------------------------------------------------
+# FIXME
 
 %.lst: %.c
        $(CC) $(c_flags) -g -c -o $*.o $<
        $(TOPDIR)/scripts/makelst $* $(TOPDIR) $(OBJDUMP)
-#
-#
-#
+
+
+# If a Makefile does define neither O_TARGET nor L_TARGET,
+# use a standard O_TARGET named "built-in.o"
+
+ifndef O_TARGET
+ifndef L_TARGET
+O_TARGET := built-in.o
+endif
+endif
+
+# Build the compiled-in targets
+# ---------------------------------------------------------------------------
+
 all_targets: $(O_TARGET) $(L_TARGET) sub_dirs
 
 # To build objects in subdirs, we need to descend into the directories