X-Git-Url: https://rtime.felk.cvut.cz/gitweb/l4.git/blobdiff_plain/db98496bb0100861213549d77942b4e5434a7535..bc7a63ab1d89d95508f55f44f23c2adda7a60037:/kernel/fiasco/src/Makefile diff --git a/kernel/fiasco/src/Makefile b/kernel/fiasco/src/Makefile index 1bcd2748f..728f0e755 100644 --- a/kernel/fiasco/src/Makefile +++ b/kernel/fiasco/src/Makefile @@ -4,7 +4,8 @@ tooldir := $(srcdir)/../tool CONFIG_BANNER_STRING ?= "Fiasco - prepare for world domination" .PHONY: all do-all test-all config textconfig menuconfig xconfig \ - oldconfig regenconfig mrproper doc help update nconfig + oldconfig regenconfig mrproper doc help update nconfig \ + savedefconfig listnewconfig oldnoconfig oldaskconfig all: @@ -98,8 +99,11 @@ ALL = $(foreach subsys, $(SUBSYSTEMS), $($(subsys)) $($(subsys)_EXTRA)) $(foreach m, $(GENERATED_MODULES), auto/stamp-$(m).ready): $(MODULES_FILES) .PRECIOUS: .Modules.deps -.Modules.deps: $(MODULES_FILES) globalconfig.h +.Modules.deps: $(MODULES_FILES) globalconfig.h source @mkdir -p auto + @echo "Cleaning up build directory" + $(VERBOSE)$(RM_R) *.o fiasco *.d .*.d .*.d.new *.d.new + $(VERBOSE)$(RM_R) auto/*.cc auto/*.h auto/*.S auto/stamp-*.ready @echo "Creating $@" @($(foreach mod, $(GENERATED_MODULES), \ echo 'auto/stamp-$(mod).ready: \ @@ -148,6 +152,7 @@ all doc $(addsuffix .ps,$(DEPS_FILES)) $(addsuffix .svg,$(DEPS_FILES)) TAGS tags %.o %_t: $(MODULES_FILES) .Modules.deps create-sources globalconfig.h $(MAKE) srcdir=$(srcdir) objbase=$(objbase) -f $(srcdir)/Makefile.sub2 $@ + # Divert any target we do not explicitly mention in this Makefile to # Makefile.sub2. (Unfortunately 1, this does not work for file # targets that already exist in this directory. Unfortunately 2, @@ -171,7 +176,11 @@ endif # ! config xconfig menuconfig oldconfig auto: test -e auto || mkdir auto -BSP_DIR := $(srcdir)/kern/arm/bsp $(srcdir)/kern/ppc32/bsp +source: + test -e source || ln -sf $(srcdir) source + + +BSP_DIR := $(srcdir)/kern/arm/bsp $(srcdir)/kern/ppc32/bsp $(srcdir)/kern/sparc/bsp KCONFIG_FILE := Kconfig KCONFIG_SRC_FILE := $(srcdir)/Kconfig KCONFIG_BSP_FILES := $(shell find $(BSP_DIR) -name Kconfig -follow -print) @@ -184,25 +193,34 @@ kconfig_call = $(MAKE) -C $(tooldir)/kconfig O=$(objbase) \ KCONFIG_AUTOCONFIG=config/auto.conf \ KERNELVERSION=SVN MENUCONFIG_COLOR=blackbg \ INCLUDE_PPC32=$(INCLUDE_PPC32) \ + INCLUDE_SPARC=$(INCLUDE_SPARC) \ fiasco_srcdir=$(srcdir)/.. $(KCONFIG_FILE): $(KCONFIG_SRC_FILE) $(KCONFIG_BSP_FILES) $(srcdir)/Makefile @$(tooldir)/gen_kconfig $(KCONFIG_SRC_FILE) $(KCONFIG_FILE) $(KCONFIG_BSP_FILES) globalconfig.out: $(KCONFIG_FILE) - $(kconfig_call) oldconfig + +$(kconfig_call) oldconfig globalconfig.h: globalconfig.out - $(kconfig_call) silentoldconfig + +$(kconfig_call) silentoldconfig config: $(KCONFIG_FILE) - $(kconfig_call) menuconfig silentoldconfig + +$(kconfig_call) menuconfig + +$(kconfig_call) silentoldconfig textconfig: $(KCONFIG_FILE) - $(kconfig_call) config silentoldconfig + +$(kconfig_call) config silentoldconfig menuconfig oldconfig xconfig gconfig nconfig randconfig allyesconfig allnoconfig: $(KCONFIG_FILE) - $(kconfig_call) $@ silentoldconfig + +$(kconfig_call) $@ + +$(kconfig_call) silentoldconfig + +listnewconfig oldnoconfig savedefconfig: $(KCONFIG_FILE) + +$(kconfig_call) $@ + +oldaskconfig: $(KCONFIG_FILE) + +$(kconfig_call) config ifneq ($(filter clean cleanall mrproper,$(MAKECMDGOALS)),) @@ -225,9 +243,10 @@ clean: $(foreach subsys, $(SUBSYSTEMS), clean-$(subsys)) $(RM) .Clean-auto .Compiler-config cleanall: clean $(foreach subsys, $(SUBSYSTEMS), cleanall-$(subsys)) - $(foreach subdir, $(SUBDIRS), $(RM) $(subdir)/{.,}*.d) - $(RM) {.,}*.d {.,}*.d.new *~ globalconfig.{h,h.old} Circular - $(RM) .Modules.deps + $(foreach subdir, $(SUBDIRS), $(RM) $(subdir)/*.d $(subdir)/.*.d) + $(RM) *.d .*.d .*.d.new *.d.new *~ + $(RM) globalconfig.h globalconfig.h.old Circular + $(RM) .Modules.deps source mrproper: cleanall $(RM_R) globalconfig.out Modules.* DEPS*