Commit 6c52c43c authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.make

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents bdf47e98 a6209819
......@@ -55,8 +55,7 @@ all: do-it-all
ifeq (.config,$(wildcard .config))
include .config
ifeq (.depend,$(wildcard .depend))
include .depend
ifeq (.hdepend,$(wildcard .hdepend))
do-it-all: vmlinux
else
CONFIGURATION = depend
......@@ -93,11 +92,12 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fomit-frame-pointer -fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
INIT =init/init.o
CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
NETWORKS =net/network.o
LIBS =$(TOPDIR)/lib/lib.a
SUBDIRS =kernel lib drivers mm fs net ipc sound
SUBDIRS =init kernel lib drivers mm fs net ipc sound
DRIVERS-n :=
DRIVERS-y :=
......@@ -165,8 +165,8 @@ export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
boot: vmlinux
@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C arch/$(ARCH)/boot
vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
vmlinux: include/linux/version.h $(CONFIGURATION) linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) $(INIT) \
--start-group \
$(CORE_FILES) \
$(LIBS) \
......@@ -220,11 +220,6 @@ include/config/MARKER: scripts/split-include include/linux/autoconf.h
# Generate some files
$(TOPDIR)/include/linux/version.h: include/linux/version.h
$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
include/linux/compile.h: $(CONFIGURATION) include/linux/version.h
@echo Generating $@
@. scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
include/linux/version.h: ./Makefile
@echo Generating $@
......@@ -232,26 +227,12 @@ include/linux/version.h: ./Makefile
comma := ,
# ---------------------------------------------------------------------------
# Build files in init
# FIXME should be moved to init/Makefile
init/version.o: init/version.c include/linux/compile.h include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
init/main.o: init/main.c include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
init/do_mounts.o: init/do_mounts.c include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
# ---------------------------------------------------------------------------
# Generate dependencies
depend dep: dep-files
dep-files: scripts/mkdep archdep include/linux/version.h
scripts/mkdep -- init/*.c > .depend
scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
ifdef CONFIG_MODVERSIONS
......@@ -487,4 +468,3 @@ backup: mrproper
sums:
find . -type f -print | sort | xargs sum > .SUMS
......@@ -41,8 +41,7 @@ obj-m := $(filter-out $(obj-y),$(obj-m))
#
# Get things started.
#
first_rule: sub_dirs
$(MAKE) all_targets
first_rule: all_targets
both-m := $(filter $(mod-subdirs), $(subdir-y))
SUB_DIRS := $(subdir-y)
......@@ -102,7 +101,13 @@ endif
#
#
#
all_targets: $(O_TARGET) $(L_TARGET)
all_targets: $(O_TARGET) $(L_TARGET) sub_dirs
# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live
# in the local directory
subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
# Do build these objects, we need to descend into the directories
$(subdir-obj-y): sub_dirs
#
# Rule to compile a set of .o files into one .o file
......
#
# Makefile for the linux kernel.
#
O_TARGET := init.o
obj-y := main.o version.o do_mounts.o
include $(TOPDIR)/Rules.make
# dependencies on generated files need to be listed explicitly
version.o: ../include/linux/compile.h
# compile.h changes depending on hostname, generation number, etc,
# so we regenerate it always.
# mkcompile_h will make sure to only update the
# actualy file if its content has changed.
../include/linux/compile.h: ../include/linux/version.h dummy
@echo Generating $@
@. ../scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
......@@ -5,11 +5,11 @@ CC=$4
# Generate a temporary compile.h
( echo /\* This file is auto generated, version `cat .version` \*/
( echo /\* This file is auto generated, version `cat ../.version` \*/
echo \#define UTS_MACHINE \"$ARCH\"
echo -n \#define UTS_VERSION \"\#`cat .version`
echo -n \#define UTS_VERSION \"\#`cat ../.version`
if [ -n "$SMP" ] ; then echo -n " SMP"; fi
echo ' '`date`'"'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment