diff --git a/Makefile b/Makefile index 31e93ab..1c43645 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,14 @@ SRC_C_SOURCES_NAMES := $(notdir $(basename $(wildcard $(SRCD)/*.$(SRC_FMT)))) # Location of C binaries C_BINARIES := $(addprefix $(QEMU_BIN)/,$(SRC_C_SOURCES_NAMES)) -all: $(QEMUSH) $(MODULES) $(C_BINARIES) +# Directories in ~qemu necessary for qemush to work +QEMUSH_DIRS_NAMES := bin launchers images +QEMUSH_DIRS := $(addprefix $(QEMU_HOME)/,$(QEMUSH_DIRS_NAMES)) + +all: $(QEMUSH_DIRS) $(MODULES) $(C_BINARIES) $(QEMUSH) + +$(QEMUSH_DIRS): + $(SUDO_QEMU) mkdir -p $@ $(QEMUSH): $(SRC_QEMUSH) sudo install -m 755 $^ $@