# makefile to manage qemu package
#
-# Copyright (c) 2015 OPNFV and Intel Corporation.
+# Copyright (c) 2015-2016 OPNFV and Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
WORK_DIR = qemu
TAG_DONE_FLAG = $(WORK_DIR)/.$(QEMU_TAG).done
+INSTALL_TARGET = force_make force_install
CONFIG_CMD =
CONFIG_CMD += ./configure
CONFIG_CMD += --target-list="x86_64-softmmu"
-
+QEMU_VANILLA = ../../src_vanilla/qemu
+QEMU_CUSE = ../../src_cuse/qemu
all: force_make
.PHONY: install force_install config force_make
-# install depends on make
-force_install: force_make
- @echo "Finished making $(WORK_DIR) "
-
config $(WORK_DIR)/Makefile: $(WORK_DIR)/configure
$(AT)cd $(WORK_DIR); $(CONFIG_CMD)
@echo "Configure done"
-INSTALL_TARGET = force_install force_make
-
force_make: $(WORK_DIR)/Makefile
+ $(AT)cd $(WORK_DIR) && git pull $(QEMU_URL) $(QEMU_TAG)
+ $(AT)echo "git pull done"
$(AT)$(MAKE) -C $(WORK_DIR) $(MORE_MAKE_FLAGS)
@echo "Make done"
# hard way to clean and clobber
clean:
+ $(AT)cd $(WORK_DIR) && git clean -xfd *.o
clobber:
$(AT)rm -rf $(WORK_DIR)
+ $(AT)rm -rf $(QEMU_VANILLA)
+ $(AT)rm -rf $(QEMU_CUSE)
-# cleanse is for developer who would like to keep the
+# distclean is for developer who would like to keep the
# clone git repo, saving time to fetch again from url
-cleanse:
+distclean:
$(AT)cd $(WORK_DIR) && git clean -xfd && git checkout -f
test:
$(WORK_DIR):
$(AT)git clone $(QEMU_URL)
+ $(AT)mkdir -p $(QEMU_VANILLA)
+ $(AT)cp -rf ./* $(QEMU_VANILLA)
+ $(AT)mkdir -p $(QEMU_CUSE)
+ $(AT)cp -rf ./* $(QEMU_CUSE)
$(TAG_DONE_FLAG): $(WORK_DIR)
$(AT)cd $(WORK_DIR); git checkout $(QEMU_TAG)