cleanup qemu/Makefile*

This commit is contained in:
Nguyen Anh Quynh
2020-04-24 15:34:06 +08:00
parent d13609d49d
commit dff96a24a1
2 changed files with 3 additions and 21 deletions

View File

@ -20,7 +20,6 @@ endif
endif endif
CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y) CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
CONFIG_ALL=y CONFIG_ALL=y
-include config-all-devices.mak -include config-all-devices.mak
@ -52,7 +51,7 @@ GENERATED_SOURCES += qapi-types.c qapi-visit.c
Makefile: ; Makefile: ;
configure: ; configure: ;
.PHONY: all clean cscope distclean install recurse-all .PHONY: all clean cscope distclean recurse-all
$(call set-vpath, $(SRC_PATH)) $(call set-vpath, $(SRC_PATH))
@ -109,7 +108,7 @@ dummy := $(call unnest-vars,, \
common-obj-y \ common-obj-y \
common-obj-m) common-obj-m)
all: $(TOOLS) $(HELPERS-y) recurse-all modules all: $(HELPERS-y) recurse-all modules
config-host.h: config-host.h-timestamp config-host.h: config-host.h-timestamp
config-host.h-timestamp: config-host.mak config-host.h-timestamp: config-host.mak
@ -157,7 +156,7 @@ clean:
# avoid old build problems by removing potentially incorrect old files # avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} + find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name '*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~ rm -f $(HELPERS-y) TAGS cscope.* *.pod *~ */*~
rm -rf .libs */.libs rm -rf .libs */.libs
@# May not be present in GENERATED_HEADERS @# May not be present in GENERATED_HEADERS
rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp)

View File

@ -10,11 +10,6 @@ QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H
QEMU_CFLAGS+=-I$(SRC_PATH)/include QEMU_CFLAGS+=-I$(SRC_PATH)/include
ifdef CONFIG_USER_ONLY
# user emulator name
QEMU_PROG=qemu-$(TARGET_NAME)
QEMU_PROG_BUILD = $(QEMU_PROG)
else
# system emulator name # system emulator name
QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF) QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF)
ifneq (,$(findstring -mwindows,$(libs_softmmu))) ifneq (,$(findstring -mwindows,$(libs_softmmu)))
@ -26,7 +21,6 @@ QEMU_PROG_BUILD = $(QEMU_PROGW)
else else
QEMU_PROG_BUILD = $(QEMU_PROG) QEMU_PROG_BUILD = $(QEMU_PROG)
endif endif
endif
PROGS=$(QEMU_PROG) $(QEMU_PROGW) PROGS=$(QEMU_PROG) $(QEMU_PROGW)
@ -69,7 +63,6 @@ endif # CONFIG_SOFTMMU
dummy := $(call unnest-vars,,obj-y) dummy := $(call unnest-vars,,obj-y)
all-obj-y := $(obj-y) all-obj-y := $(obj-y)
block-obj-y :=
common-obj-y := common-obj-y :=
include $(SRC_PATH)/Makefile.objs include $(SRC_PATH)/Makefile.objs
@ -77,16 +70,11 @@ dummy := $(call unnest-vars,..,util-obj-y)
target-obj-y-save := $(target-obj-y) $(util-obj-y) target-obj-y-save := $(target-obj-y) $(util-obj-y)
dummy := $(call unnest-vars,.., \
block-obj-y \
block-obj-m)
dummy := $(call unnest-vars,..,common-obj-y,common-obj-m) dummy := $(call unnest-vars,..,common-obj-y,common-obj-m)
target-obj-y := $(target-obj-y-save) target-obj-y := $(target-obj-y-save)
all-obj-y += $(common-obj-y) all-obj-y += $(common-obj-y)
all-obj-y += $(target-obj-y) all-obj-y += $(target-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y)
# determine shared lib extension # determine shared lib extension
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep __apple_build_version__ | wc -l | tr -d " ") IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep __apple_build_version__ | wc -l | tr -d " ")
@ -109,11 +97,6 @@ clean:
rm -f *.a *~ $(PROGS) rm -f *.a *~ $(PROGS)
rm -f $(shell find . -name '*.[od]') rm -f $(shell find . -name '*.[od]')
install: all
ifneq ($(PROGS),)
$(call install-prog,$(PROGS),$(DESTDIR)$(bindir))
endif
GENERATED_HEADERS += config-target.h GENERATED_HEADERS += config-target.h
Makefile: $(GENERATED_HEADERS) Makefile: $(GENERATED_HEADERS)