From cdbf4dacedf0be20bc905b6f139f7f0c2f484686 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Fri, 8 Apr 2016 13:08:24 +0200 Subject: [PATCH] Make Makefile work as intended --- build/l4/.gitignore | 2 ++ build/l4/Makefile | 52 ++++++++++++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 build/l4/.gitignore diff --git a/build/l4/.gitignore b/build/l4/.gitignore new file mode 100644 index 0000000..2d41cce --- /dev/null +++ b/build/l4/.gitignore @@ -0,0 +1,2 @@ +/fiasco/ +/l4re/ diff --git a/build/l4/Makefile b/build/l4/Makefile index df80379..e1989c5 100644 --- a/build/l4/Makefile +++ b/build/l4/Makefile @@ -1,21 +1,38 @@ all: fiasco l4re +help: + @echo "Supported targets:" + @echo " all - Build all" + @echo " fiasco - Build Fiasco kernel" + @echo " fiasco-config - Reconfigure Fiasco kernel" + @echo " l4re - Build L4 runtime environment" + @echo " l4re-config - Reconfigure L4 runtime environment" + @echo " hello - Build image with hello entry" + .NOTPARALLEL: +########## Fiasco ########## + +.PHONY: fiasco fiasco: fiasco/globalconfig.out - $(MAKE) -C $(CURDIR)/fiasco + $(MAKE) -C fiasco +.PHONY: fiasco-config fiasco-config: fiasco/globalconfig.out ifeq ($(MAKECMDGOALS),fiasco-config) .PHONY: fiasco/globalconfig.out endif -fiasco/globalconfig.out: $(CURDIR)/fiasco - $(MAKE) -C $(CURDIR)/fiasco config +fiasco/globalconfig.out: fiasco/.stamp-jh + $(MAKE) -C $(@D) config + touch $@ -$(CURDIR)/fiasco: - $(MAKE) -C ../../l4/kernel/fiasco BUILDDIR=$@ +fiasco/.stamp-jh: + $(MAKE) -C ../../l4/kernel/fiasco BUILDDIR=$(CURDIR)/$(@D) + touch $@ + +########## L4Re ########## L4RE_PKGS = acpica bootstrap cxx_thread drivers drivers-frst fb-drv \ hello input io/io io/libio io/libio-direct io/libio-io io/libvbus \ @@ -32,21 +49,26 @@ l4re-core/uclibc-minimal libedid libirq libvcpu loader log lxfuxlibc \ rtc shmc x86emu .PHONY: l4re -l4re: l4/.kconfig - $(MAKE) -C l4 #S="$(L4RE_PKGS:%=pkg/%)" +l4re: l4re/.kconfig + $(MAKE) -C l4re #S="$(L4RE_PKGS:%=pkg/%)" -l4re-config: l4/.kconfig +.PHONY: l4re-config +l4re-config: l4re/.kconfig -ifeq ($(MAKECMDGOALS),l4-config) -.PHONY: l4/.kconfig +ifeq ($(MAKECMDGOALS),l4re-config) +.PHONY: l4re/.kconfig endif -l4/.kconfig: $(CURDIR)/l4 - $(MAKE) -C l4 config +l4re/.kconfig: l4re/.stamp-jh + $(MAKE) -C $(@D) config + touch $@ + +l4re/.stamp-jh: + $(MAKE) -C ../../l4/l4 B=$(CURDIR)/$(@D) + touch $@ -$(CURDIR)/l4: - $(MAKE) -C ../../l4/l4 B=$@ +########## Application ########## .PHONY: hello hello: - $(MAKE) -C l4 MODULE_SEARCH_PATH=$(CURDIR)/fiasco E=hello elfimage + $(MAKE) -C l4re MODULE_SEARCH_PATH=$(CURDIR)/fiasco E=hello elfimage -- 2.39.2