Commit 8e85e6c3 authored by Kai Germaschewski's avatar Kai Germaschewski

Merge 128.255.35.148:kernel/v2.5/linux-2.5.make

into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.make
parents 7f9f9f51 095693c7
...@@ -203,7 +203,7 @@ scripts/docproc scripts/fixdep scripts/split-include : scripts ; ...@@ -203,7 +203,7 @@ scripts/docproc scripts/fixdep scripts/split-include : scripts ;
.PHONY: scripts .PHONY: scripts
scripts: scripts:
+@$(Q)$(MAKE) -f scripts/Makefile.build obj=scripts $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts
# Objects we will link into vmlinux / subdirs we need to visit # Objects we will link into vmlinux / subdirs we need to visit
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -435,7 +435,7 @@ include/config/MARKER: scripts/split-include include/linux/autoconf.h ...@@ -435,7 +435,7 @@ include/config/MARKER: scripts/split-include include/linux/autoconf.h
# with it and forgot to run make oldconfig # with it and forgot to run make oldconfig
include/linux/autoconf.h: .config include/linux/autoconf.h: .config
+@$(call descend,scripts/kconfig,scripts/kconfig/conf) $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts/kconfig scripts/kconfig/conf
./scripts/kconfig/conf -s arch/$(ARCH)/Kconfig ./scripts/kconfig/conf -s arch/$(ARCH)/Kconfig
# Generate some files # Generate some files
...@@ -639,13 +639,13 @@ ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) ...@@ -639,13 +639,13 @@ ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
make_with_config make_with_config
scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf: scripts/fixdep FORCE scripts/kconfig/conf scripts/kconfig/mconf scripts/kconfig/qconf: scripts/fixdep FORCE
+@$(call descend,scripts/kconfig,$@) $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts/kconfig $@
xconfig: scripts/kconfig/qconf xconfig: scripts/kconfig/qconf
./scripts/kconfig/qconf arch/$(ARCH)/Kconfig ./scripts/kconfig/qconf arch/$(ARCH)/Kconfig
menuconfig: scripts/kconfig/mconf menuconfig: scripts/kconfig/mconf
$(Q)$(MAKE) -f scripts/Makefile.build obj=scripts lxdialog $(Q)$(MAKE) -f scripts/Makefile.build obj=scripts/lxdialog
./scripts/kconfig/mconf arch/$(ARCH)/Kconfig ./scripts/kconfig/mconf arch/$(ARCH)/Kconfig
config: scripts/kconfig/conf config: scripts/kconfig/conf
...@@ -827,7 +827,7 @@ else # ifneq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) ...@@ -827,7 +827,7 @@ else # ifneq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
# =========================================================================== # ===========================================================================
%:: FORCE %:: FORCE
$(MAKE) $@ $(Q)$(MAKE) $@
endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
endif # ifdef include_config endif # ifdef include_config
...@@ -888,6 +888,6 @@ endef ...@@ -888,6 +888,6 @@ endef
# $(call descend,<dir>,<target>) # $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target> # Recursively call a sub-make in <dir> with target <target>
descend = $(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2) descend =$(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2)
FORCE: FORCE:
...@@ -66,7 +66,7 @@ drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/ ...@@ -66,7 +66,7 @@ drivers-$(CONFIG_OPROFILE) += arch/i386/oprofile/
CFLAGS += -Iarch/i386/$(MACHINE) CFLAGS += -Iarch/i386/$(MACHINE)
AFLAGS += -Iarch/i386/$(MACHINE) AFLAGS += -Iarch/i386/$(MACHINE)
makeboot = $(call descend,arch/i386/boot,$(1)) makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/i386/boot $(1)
.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \ .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
clean archclean archmrproper clean archclean archmrproper
...@@ -77,20 +77,20 @@ BOOTIMAGE=arch/i386/boot/bzImage ...@@ -77,20 +77,20 @@ BOOTIMAGE=arch/i386/boot/bzImage
zImage zlilo zdisk: BOOTIMAGE=arch/i386/boot/zImage zImage zlilo zdisk: BOOTIMAGE=arch/i386/boot/zImage
zImage bzImage: vmlinux zImage bzImage: vmlinux
+@$(call makeboot,$(BOOTIMAGE)) $(call makeboot,$(BOOTIMAGE))
compressed: zImage compressed: zImage
zlilo bzlilo: vmlinux zlilo bzlilo: vmlinux
+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zlilo) $(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zlilo)
zdisk bzdisk: vmlinux zdisk bzdisk: vmlinux
+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zdisk) $(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zdisk)
install: vmlinux install: vmlinux
+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) install) $(call makeboot,BOOTIMAGE=$(BOOTIMAGE) install)
archclean: archclean:
@$(MAKE) -f scripts/Makefile.clean obj=arch/i386/boot $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/i386/boot
archmrproper: archmrproper:
...@@ -32,12 +32,6 @@ subdir- := compressed ...@@ -32,12 +32,6 @@ subdir- := compressed
host-progs := tools/build host-progs := tools/build
# Default
boot: bzImage
include $(TOPDIR)/Rules.make
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
$(obj)/zImage: IMAGE_OFFSET := 0x1000 $(obj)/zImage: IMAGE_OFFSET := 0x1000
...@@ -53,6 +47,7 @@ cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \ ...@@ -53,6 +47,7 @@ cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
$(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \ $(obj)/zImage $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
$(obj)/vmlinux.bin $(obj)/tools/build FORCE $(obj)/vmlinux.bin $(obj)/tools/build FORCE
$(call if_changed,image) $(call if_changed,image)
@echo 'Kernel: $@ is ready'
$(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
...@@ -64,9 +59,8 @@ $(obj)/setup $(obj)/bootsect: %: %.o FORCE ...@@ -64,9 +59,8 @@ $(obj)/setup $(obj)/bootsect: %: %.o FORCE
$(call if_changed,ld) $(call if_changed,ld)
$(obj)/compressed/vmlinux: FORCE $(obj)/compressed/vmlinux: FORCE
+@$(call descend,$(obj)/compressed,IMAGE_OFFSET=$(IMAGE_OFFSET) \ $(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed \
$(obj)/compressed/vmlinux) IMAGE_OFFSET=$(IMAGE_OFFSET) $@
zdisk: $(BOOTIMAGE) zdisk: $(BOOTIMAGE)
dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0 dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0
......
...@@ -13,6 +13,7 @@ LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32 ...@@ -13,6 +13,7 @@ LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
$(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE $(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
$(call if_changed,ld) $(call if_changed,ld)
@:
$(obj)/vmlinux.bin: vmlinux FORCE $(obj)/vmlinux.bin: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
......
# #
# Makefile for misc devices that really don't fit anywhere else. # Makefile for misc devices that really don't fit anywhere else.
# #
obj- := misc.o # Dummy rule to force built-in.o to be made
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -8,31 +8,12 @@ ...@@ -8,31 +8,12 @@
# docproc: Preprocess .tmpl file in order to generate .sgml documentation # docproc: Preprocess .tmpl file in order to generate .sgml documentation
# conmakehash: Create arrays for initializing the kernel console tables # conmakehash: Create arrays for initializing the kernel console tables
EXTRA_TARGETS := fixdep split-include docproc conmakehash
subdir- := lxdialog kconfig
# Yikes. We need to build this stuff here even if the user only wants
# modules.
KBUILD_BUILTIN := 1
# The following temporary rule will make sure that people's
# trees get updated to the right permissions, since patch(1)
# can't do it
# ---------------------------------------------------------------------------
host-progs := fixdep split-include conmakehash docproc host-progs := fixdep split-include conmakehash docproc
build-targets := $(host-progs)
include $(TOPDIR)/Rules.make # Let clean descend into subdirs
subdir- := lxdialog kconfig
# ---------------------------------------------------------------------------
# Targets hardcoded and wellknow in top-level makefile
.PHONY: lxdialog
lxdialog:
$(call descend,scripts/lxdialog,)
# fixdep is needed to compile other host programs # fixdep is needed to compile other host programs
$(obj)/split-include $(obj)/docproc \ $(obj)/split-include $(obj)/docproc \
$(obj)/conmakehash lxdialog: $(obj)/fixdep $(obj)/conmakehash: $(obj)/fixdep
...@@ -40,12 +40,14 @@ endif ...@@ -40,12 +40,14 @@ endif
ifdef L_TARGET ifdef L_TARGET
L_TARGET := $(obj)/$(L_TARGET) L_TARGET := $(obj)/$(L_TARGET)
else else
ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-)),)
O_TARGET := $(obj)/built-in.o O_TARGET := $(obj)/built-in.o
endif endif
endif
__build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \ __build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \
$(if $(KBUILD_MODULES),$(obj-m)) \ $(if $(KBUILD_MODULES),$(obj-m)) \
$(subdir-ym) $(subdir-ym) $(build-targets)
@: @:
# Compile C sources (.c) # Compile C sources (.c)
...@@ -103,7 +105,9 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< ...@@ -103,7 +105,9 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
$(call if_changed_dep,cc_o_c) $(call if_changed_dep,cc_o_c)
quiet_cmd_cc_lst_c = MKLST $@ quiet_cmd_cc_lst_c = MKLST $@
cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && sh scripts/makelst $*.o System.map $(OBJDUMP) > $@ cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && \
$(CONFIG_SHELL) $(src)/scripts/makelst $*.o \
System.map $(OBJDUMP) > $@
%.lst: %.c FORCE %.lst: %.c FORCE
$(call if_changed_dep,cc_lst_c) $(call if_changed_dep,cc_lst_c)
...@@ -116,9 +120,6 @@ modkern_aflags := $(AFLAGS_KERNEL) ...@@ -116,9 +120,6 @@ modkern_aflags := $(AFLAGS_KERNEL)
$(real-objs-m) : modkern_aflags := $(AFLAGS_MODULE) $(real-objs-m) : modkern_aflags := $(AFLAGS_MODULE)
$(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE) $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS) \
$(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
...@@ -217,9 +218,7 @@ targets += $(multi-used-y) $(multi-used-m) ...@@ -217,9 +218,7 @@ targets += $(multi-used-y) $(multi-used-m)
# Create executable from a single .c file # Create executable from a single .c file
# host-csingle -> Executable # host-csingle -> Executable
quiet_cmd_host-csingle = HOSTCC $@ quiet_cmd_host-csingle = HOSTCC $@
cmd_host-csingle = $(HOSTCC) -Wp,-MD,$(depfile) \ cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOST_LOADLIBES) -o $@ $<
$(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
$(HOST_LOADLIBES) -o $@ $<
$(host-csingle): %: %.c FORCE $(host-csingle): %: %.c FORCE
$(call if_changed_dep,host-csingle) $(call if_changed_dep,host-csingle)
...@@ -235,9 +234,7 @@ $(host-cmulti): %: $(host-cobjs) $(host-cshlib) FORCE ...@@ -235,9 +234,7 @@ $(host-cmulti): %: $(host-cobjs) $(host-cshlib) FORCE
# Create .o file from a single .c file # Create .o file from a single .c file
# host-cobjs -> .o # host-cobjs -> .o
quiet_cmd_host-cobjs = HOSTCC $@ quiet_cmd_host-cobjs = HOSTCC $@
cmd_host-cobjs = $(HOSTCC) -Wp,-MD,$(depfile) \ cmd_host-cobjs = $(HOSTCC) $(hostc_flags) -c -o $@ $<
$(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
$(HOSTCFLAGS_$(@F)) -c -o $@ $<
$(host-cobjs): %.o: %.c FORCE $(host-cobjs): %.o: %.c FORCE
$(call if_changed_dep,host-cobjs) $(call if_changed_dep,host-cobjs)
...@@ -253,18 +250,14 @@ $(host-cxxmulti): %: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE ...@@ -253,18 +250,14 @@ $(host-cxxmulti): %: $(host-cobjs) $(host-cxxobjs) $(host-cshlib) FORCE
# Create .o file from a single .cc (C++) file # Create .o file from a single .cc (C++) file
quiet_cmd_host-cxxobjs = HOSTCXX $@ quiet_cmd_host-cxxobjs = HOSTCXX $@
cmd_host-cxxobjs = $(HOSTCXX) -Wp,-MD,$(depfile) \ cmd_host-cxxobjs = $(HOSTCXX) $(hostcxx_flags) -c -o $@ $<
$(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
$(HOSTCXXFLAGS_$(@F)) -c -o $@ $<
$(host-cxxobjs): %.o: %.cc FORCE $(host-cxxobjs): %.o: %.cc FORCE
$(call if_changed_dep,host-cxxobjs) $(call if_changed_dep,host-cxxobjs)
# Compile .c file, create position independent .o file # Compile .c file, create position independent .o file
# host-cshobjs -> .o # host-cshobjs -> .o
quiet_cmd_host-cshobjs = HOSTCC -fPIC $@ quiet_cmd_host-cshobjs = HOSTCC -fPIC $@
cmd_host-cshobjs = $(HOSTCC) -Wp,-MD,$(depfile) -fPIC\ cmd_host-cshobjs = $(HOSTCC) $(hostc_flags) -fPIC -c -o $@ $<
$(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
$(HOSTCFLAGS_$(@F)) -c -o $@ $<
$(host-cshobjs): %.o: %.c FORCE $(host-cshobjs): %.o: %.c FORCE
$(call if_changed_dep,host-cshobjs) $(call if_changed_dep,host-cshobjs)
......
...@@ -92,6 +92,7 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) ...@@ -92,6 +92,7 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs))))
# Add subdir path # Add subdir path
EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS)) EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS))
build-targets := $(addprefix $(obj)/,$(build-targets))
obj-y := $(addprefix $(obj)/,$(obj-y)) obj-y := $(addprefix $(obj)/,$(obj-y))
obj-m := $(addprefix $(obj)/,$(obj-m)) obj-m := $(addprefix $(obj)/,$(obj-m))
export-objs := $(addprefix $(obj)/,$(export-objs)) export-objs := $(addprefix $(obj)/,$(export-objs))
...@@ -128,6 +129,12 @@ modname_flags = $(if $(filter 1,$(words $(modname))),-DKBUILD_MODNAME=$(subst $ ...@@ -128,6 +129,12 @@ modname_flags = $(if $(filter 1,$(words $(modname))),-DKBUILD_MODNAME=$(subst $
c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \ c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
$(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \ $(modkern_cflags) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) \
$(basename_flags) $(modname_flags) $(export_flags) $(basename_flags) $(modname_flags) $(export_flags)
a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(NOSTDINC_FLAGS)\
$(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
hostc_flags = -Wp,-MD,$(depfile) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS)\
$(HOSTCFLAGS_$(*F).o)
hostcxx_flags = -Wp,-MD,$(depfile) $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS)\
$(HOSTCXXFLAGS_$(*F).o)
# Finds the multi-part object the current object will be linked into # Finds the multi-part object the current object will be linked into
modname-multi = $(sort $(foreach m,$(multi-used),\ modname-multi = $(sort $(foreach m,$(multi-used),\
...@@ -139,7 +146,7 @@ modname-multi = $(sort $(foreach m,$(multi-used),\ ...@@ -139,7 +146,7 @@ modname-multi = $(sort $(foreach m,$(multi-used),\
quiet_cmd_shipped = SHIPPED $@ quiet_cmd_shipped = SHIPPED $@
cmd_shipped = cat $< > $@ cmd_shipped = cat $< > $@
%:: %_shipped $(obj)/%:: $(src)/%_shipped
$(call cmd,shipped) $(call cmd,shipped)
# Commands useful for building a boot image # Commands useful for building a boot image
...@@ -236,4 +243,4 @@ endef ...@@ -236,4 +243,4 @@ endef
# $(call descend,<dir>,<target>) # $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target> # Recursively call a sub-make in <dir> with target <target>
descend = $(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2) descend =$(Q)$(MAKE) -f scripts/Makefile.build obj=$(1) $(2)
...@@ -16,18 +16,14 @@ endif ...@@ -16,18 +16,14 @@ endif
endif endif
host-progs := lxdialog host-progs := lxdialog
build-targets := $(host-progs)
lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
util.o lxdialog.o msgbox.o util.o lxdialog.o msgbox.o
EXTRA_TARGETS := lxdialog
first_rule: ncurses first_rule: ncurses
include $(TOPDIR)/Rules.make
.PHONY: ncurses .PHONY: ncurses
ncurses: ncurses:
@echo "main() {}" > lxtemp.c @echo "main() {}" > lxtemp.c
@if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \ @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \
......
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