X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/e85c0d14014514a2f0faeae5b4c23fab5b234de4..6bb58d200a9e68808e856df76a0e2fd3bf38e35d:/Makefile.target diff --git a/Makefile.target b/Makefile.target index 3d49f29457..ae02495951 100644 --- a/Makefile.target +++ b/Makefile.target @@ -4,16 +4,19 @@ BUILD_DIR?=$(CURDIR)/.. include ../config-host.mak include config-target.mak -include config-devices.mak include $(SRC_PATH)/rules.mak +ifdef CONFIG_SOFTMMU +include config-devices.mak +endif + $(call set-vpath, $(SRC_PATH):$(BUILD_DIR)) ifdef CONFIG_LINUX QEMU_CFLAGS += -I../linux-headers endif -QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target/$(TARGET_BASE_ARCH) -DNEED_CPU_H +QEMU_CFLAGS += -iquote .. -iquote $(SRC_PATH)/target/$(TARGET_BASE_ARCH) -DNEED_CPU_H -QEMU_CFLAGS+=-I$(SRC_PATH)/include +QEMU_CFLAGS+=-iquote $(SRC_PATH)/include ifdef CONFIG_USER_ONLY # user emulator name @@ -22,7 +25,7 @@ QEMU_PROG_BUILD = $(QEMU_PROG) else # system emulator name QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF) -ifneq (,$(findstring -mwindows,$(libs_softmmu))) +ifneq (,$(findstring -mwindows,$(SDL_LIBS))) # Terminate program name with a 'w' because the linker builds a windows executable. QEMU_PROGW=qemu-system-$(TARGET_NAME)w$(EXESUF) $(QEMU_PROG): $(QEMU_PROGW) @@ -36,11 +39,14 @@ endif PROGS=$(QEMU_PROG) $(QEMU_PROGW) STPFILES= +# Makefile Tests +include $(SRC_PATH)/tests/tcg/Makefile.include + config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak ifdef CONFIG_TRACE_SYSTEMTAP -stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp +stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp ifdef CONFIG_USER_ONLY TARGET_TYPE=user @@ -48,7 +54,10 @@ else TARGET_TYPE=system endif -$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all +tracetool-y = $(SRC_PATH)/scripts/tracetool.py +tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") + +$(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=stap \ @@ -58,7 +67,7 @@ $(QEMU_PROG).stp-installed: $(BUILD_DIR)/trace-events-all --target-type=$(TARGET_TYPE) \ $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp-installed") -$(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all +$(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=stap \ @@ -68,7 +77,7 @@ $(QEMU_PROG).stp: $(BUILD_DIR)/trace-events-all --target-type=$(TARGET_TYPE) \ $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG).stp") -$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all +$(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) $(call quiet-command,$(TRACETOOL) \ --group=all \ --format=simpletrace-stap \ @@ -76,6 +85,14 @@ $(QEMU_PROG)-simpletrace.stp: $(BUILD_DIR)/trace-events-all --probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \ $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-simpletrace.stp") +$(QEMU_PROG)-log.stp: $(BUILD_DIR)/trace-events-all $(tracetool-y) + $(call quiet-command,$(TRACETOOL) \ + --group=all \ + --format=log-stap \ + --backends=$(TRACE_BACKENDS) \ + --probe-prefix=qemu.$(TARGET_TYPE).$(TARGET_NAME) \ + $< > $@,"GEN","$(TARGET_DIR)$(QEMU_PROG)-log.stp") + else stap: endif @@ -86,25 +103,20 @@ all: $(PROGS) stap # Dummy command so that make thinks it has done something @true +obj-y += trace/ + ######################################################### # cpu emulator library obj-y += exec.o obj-y += accel/ -obj-y += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o -obj-y += tcg/tcg-common.o tcg/tcg-runtime.o -obj-$(CONFIG_TCG_INTERPRETER) += tci.o +obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o +obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o +obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o -obj-y += fpu/softfloat.o +obj-$(CONFIG_TCG) += fpu/softfloat.o obj-y += target/$(TARGET_BASE_ARCH)/ obj-y += disas.o obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o -obj-$(call lnot,$(CONFIG_HAX)) += hax-stub.o - -obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/decContext.o -obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/decNumber.o -obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/dpd/decimal32.o -obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/dpd/decimal64.o -obj-$(CONFIG_LIBDECNUMBER) += libdecnumber/dpd/decimal128.o ######################################################### # Linux user emulator target @@ -116,7 +128,7 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ -I$(SRC_PATH)/linux-user obj-y += linux-user/ -obj-y += gdbstub.o thunk.o user-exec.o user-exec-stub.o +obj-y += gdbstub.o thunk.o endif #CONFIG_LINUX_USER @@ -129,7 +141,7 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) \ -I$(SRC_PATH)/bsd-user/$(HOST_VARIANT_DIR) obj-y += bsd-user/ -obj-y += gdbstub.o user-exec.o user-exec-stub.o +obj-y += gdbstub.o endif #CONFIG_BSD_USER @@ -137,11 +149,13 @@ endif #CONFIG_BSD_USER # System emulator target ifdef CONFIG_SOFTMMU obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o -obj-y += qtest.o bootdevice.o +obj-y += qtest.o obj-y += hw/ +obj-y += qapi/ obj-y += memory.o obj-y += memory_mapping.o obj-y += dump.o +obj-$(TARGET_X86_64) += win_dump.o obj-y += migration/ram.o LIBS := $(libs_softmmu) $(LIBS) @@ -156,20 +170,12 @@ GENERATED_FILES += hmp-commands.h hmp-commands-info.h endif # CONFIG_SOFTMMU -# Workaround for http://gcc.gnu.org/PR55489, see configure. -%/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) - dummy := $(call unnest-vars,,obj-y) all-obj-y := $(obj-y) -target-obj-y := -block-obj-y := -common-obj-y := -chardev-obj-y := include $(SRC_PATH)/Makefile.objs -dummy := $(call unnest-vars,,target-obj-y) -target-obj-y-save := $(target-obj-y) dummy := $(call unnest-vars,.., \ + authz-obj-y \ block-obj-y \ block-obj-m \ chardev-obj-y \ @@ -179,18 +185,19 @@ dummy := $(call unnest-vars,.., \ io-obj-y \ common-obj-y \ common-obj-m) -target-obj-y := $(target-obj-y-save) all-obj-y += $(common-obj-y) -all-obj-y += $(target-obj-y) all-obj-y += $(qom-obj-y) +all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) $(chardev-obj-y) all-obj-$(CONFIG_USER_ONLY) += $(crypto-aes-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y) all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y) +ifdef CONFIG_SOFTMMU $(QEMU_PROG_BUILD): config-devices.mak +endif -COMMON_LDADDS = ../libqemuutil.a ../libqemustub.a +COMMON_LDADDS = ../libqemuutil.a # build either PROG or PROGW $(QEMU_PROG_BUILD): $(all-obj-y) $(COMMON_LDADDS) @@ -213,6 +220,7 @@ clean: clean-target rm -f *.a *~ $(PROGS) rm -f $(shell find . -name '*.[od]') rm -f hmp-commands.h gdbstub-xml.c + rm -f trace/generated-helpers.c trace/generated-helpers.c-timestamp ifdef CONFIG_TRACE_SYSTEMTAP rm -f *.stp endif @@ -225,6 +233,7 @@ ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset" $(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp" $(INSTALL_DATA) $(QEMU_PROG)-simpletrace.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-simpletrace.stp" + $(INSTALL_DATA) $(QEMU_PROG)-log.stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG)-log.stp" endif GENERATED_FILES += config-target.h