2012-03-04 20:32:36 +00:00
|
|
|
#######################################################################
|
|
|
|
# Target-independent parts used in system and user emulation
|
|
|
|
universal-obj-y =
|
|
|
|
|
2010-01-06 19:24:05 +00:00
|
|
|
#######################################################################
|
|
|
|
# QObject
|
|
|
|
qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o
|
|
|
|
qobject-obj-y += qjson.o json-lexer.o json-streamer.o json-parser.o
|
2011-10-24 11:33:01 +00:00
|
|
|
qobject-obj-y += qerror.o error.o qemu-error.o
|
2010-01-06 19:24:05 +00:00
|
|
|
|
2012-03-04 20:32:36 +00:00
|
|
|
universal-obj-y += $(qobject-obj-y)
|
|
|
|
|
|
|
|
#######################################################################
|
|
|
|
# QOM
|
2012-05-22 11:42:53 +00:00
|
|
|
qom-obj-y = qom/
|
2012-03-04 20:32:36 +00:00
|
|
|
|
|
|
|
universal-obj-y += $(qom-obj-y)
|
|
|
|
|
2010-10-26 08:39:19 +00:00
|
|
|
#######################################################################
|
|
|
|
# oslib-obj-y is code depending on the OS (win32 vs posix)
|
|
|
|
oslib-obj-y = osdep.o
|
2011-05-02 07:54:03 +00:00
|
|
|
oslib-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
|
|
|
|
oslib-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
|
2010-10-26 08:39:19 +00:00
|
|
|
|
2011-01-17 16:08:14 +00:00
|
|
|
#######################################################################
|
|
|
|
# coroutines
|
2011-09-08 11:46:25 +00:00
|
|
|
coroutine-obj-y = qemu-coroutine.o qemu-coroutine-lock.o qemu-coroutine-io.o
|
2012-01-18 14:40:40 +00:00
|
|
|
coroutine-obj-y += qemu-coroutine-sleep.o
|
2011-06-09 17:41:06 +00:00
|
|
|
ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
|
2011-01-17 16:08:14 +00:00
|
|
|
coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
|
2011-06-09 17:41:06 +00:00
|
|
|
else
|
2012-02-28 11:25:51 +00:00
|
|
|
ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
|
|
|
|
coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
|
|
|
|
else
|
2011-06-09 17:41:06 +00:00
|
|
|
coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
|
|
|
|
endif
|
2012-02-28 11:25:51 +00:00
|
|
|
endif
|
2011-01-17 16:08:14 +00:00
|
|
|
coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
|
|
|
|
|
2010-01-06 19:24:05 +00:00
|
|
|
#######################################################################
|
|
|
|
# block-obj-y is code used by both qemu system emulation and qemu-img
|
|
|
|
|
2011-08-21 03:23:03 +00:00
|
|
|
block-obj-y = cutils.o cache-utils.o qemu-option.o module.o async.o
|
2011-02-22 15:44:53 +00:00
|
|
|
block-obj-y += nbd.o block.o aio.o aes.o qemu-config.o qemu-progress.o qemu-sockets.o
|
2011-10-24 11:33:01 +00:00
|
|
|
block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
|
2010-01-06 19:24:05 +00:00
|
|
|
block-obj-$(CONFIG_POSIX) += posix-aio-compat.o
|
|
|
|
block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
|
2012-05-22 11:44:39 +00:00
|
|
|
block-obj-y += block/
|
2010-01-06 19:24:05 +00:00
|
|
|
|
2011-06-01 07:05:13 +00:00
|
|
|
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
|
2010-11-26 22:08:48 +00:00
|
|
|
# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
|
|
|
|
# only pull in the actual virtio-9p device if we also enabled virtio.
|
|
|
|
CONFIG_REALLY_VIRTFS=y
|
|
|
|
endif
|
2010-04-29 12:14:43 +00:00
|
|
|
|
2010-01-06 19:24:05 +00:00
|
|
|
######################################################################
|
2011-11-15 12:47:11 +00:00
|
|
|
# Target independent part of system emulation. The long term path is to
|
|
|
|
# suppress *all* target specific code in case of system emulation, i.e. a
|
|
|
|
# single QEMU executable should support all CPUs and machines.
|
2010-01-06 19:24:05 +00:00
|
|
|
|
2011-06-01 17:14:50 +00:00
|
|
|
common-obj-y = $(block-obj-y) blockdev.o
|
2012-05-22 11:45:55 +00:00
|
|
|
common-obj-y += net.o net/
|
2012-05-22 11:42:53 +00:00
|
|
|
common-obj-y += qom/
|
2011-10-24 11:33:01 +00:00
|
|
|
common-obj-y += readline.o console.o cursor.o
|
2010-10-26 08:39:19 +00:00
|
|
|
common-obj-y += $(oslib-obj-y)
|
2010-06-12 05:49:30 +00:00
|
|
|
common-obj-$(CONFIG_WIN32) += os-win32.o
|
|
|
|
common-obj-$(CONFIG_POSIX) += os-posix.o
|
2010-05-21 09:54:32 +00:00
|
|
|
|
2012-05-22 11:46:08 +00:00
|
|
|
common-obj-$(CONFIG_LINUX) += fsdev/
|
|
|
|
extra-obj-$(CONFIG_LINUX) += fsdev/
|
|
|
|
|
2011-09-13 08:30:52 +00:00
|
|
|
common-obj-y += tcg-runtime.o host-utils.o main-loop.o
|
2012-05-29 09:08:47 +00:00
|
|
|
common-obj-y += input.o
|
2011-02-22 15:44:53 +00:00
|
|
|
common-obj-y += buffered_file.o migration.o migration-tcp.o
|
2011-12-20 13:59:12 +00:00
|
|
|
common-obj-y += qemu-char.o #aio.o
|
2011-03-09 17:21:09 +00:00
|
|
|
common-obj-y += block-migration.o iohandler.o
|
2010-06-14 07:54:27 +00:00
|
|
|
common-obj-y += pflib.o
|
2011-02-04 08:06:04 +00:00
|
|
|
common-obj-y += bitmap.o bitops.o
|
2010-01-06 19:24:05 +00:00
|
|
|
|
|
|
|
common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
|
2010-09-26 16:07:57 +00:00
|
|
|
common-obj-$(CONFIG_WIN32) += version.o
|
2010-01-06 19:24:05 +00:00
|
|
|
|
2012-05-22 11:48:15 +00:00
|
|
|
common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
|
2012-05-22 11:49:02 +00:00
|
|
|
|
|
|
|
common-obj-y += audio/
|
2012-05-29 09:08:47 +00:00
|
|
|
common-obj-y += hw/
|
2012-05-22 11:48:15 +00:00
|
|
|
common-obj-y += ui/
|
2012-05-29 09:08:47 +00:00
|
|
|
common-obj-y += bt-host.o bt-vhci.o
|
2010-07-07 18:57:52 +00:00
|
|
|
|
|
|
|
common-obj-y += iov.o acl.o
|
2011-05-02 07:54:03 +00:00
|
|
|
common-obj-$(CONFIG_POSIX) += compatfd.o
|
2010-04-19 19:47:49 +00:00
|
|
|
common-obj-y += notify.o event_notifier.o
|
2010-10-23 15:24:07 +00:00
|
|
|
common-obj-y += qemu-timer.o qemu-timer-common.o
|
2010-01-06 19:24:05 +00:00
|
|
|
|
2012-05-22 11:49:43 +00:00
|
|
|
common-obj-$(CONFIG_SLIRP) += slirp/
|
2010-01-06 19:24:05 +00:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# libuser
|
|
|
|
|
|
|
|
user-obj-y =
|
|
|
|
user-obj-y += envlist.o path.o
|
|
|
|
user-obj-y += tcg-runtime.o host-utils.o
|
|
|
|
user-obj-y += cutils.o cache-utils.o
|
2012-03-04 20:32:36 +00:00
|
|
|
user-obj-y += module.o
|
|
|
|
user-obj-y += qemu-user.o
|
2011-09-15 20:45:42 +00:00
|
|
|
user-obj-y += $(trace-obj-y)
|
2012-05-22 11:42:53 +00:00
|
|
|
user-obj-y += qom/
|
2010-01-06 19:24:05 +00:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# libhw
|
|
|
|
|
2012-05-29 09:10:55 +00:00
|
|
|
hw-obj-y = vl.o dma-helpers.o qtest.o hw/
|
2010-05-14 19:31:53 +00:00
|
|
|
|
2010-03-21 08:28:47 +00:00
|
|
|
######################################################################
|
|
|
|
# libdis
|
|
|
|
# NOTE: the disassembler code is only needed for debugging
|
|
|
|
|
|
|
|
libdis-y =
|
|
|
|
libdis-$(CONFIG_ALPHA_DIS) += alpha-dis.o
|
|
|
|
libdis-$(CONFIG_ARM_DIS) += arm-dis.o
|
|
|
|
libdis-$(CONFIG_CRIS_DIS) += cris-dis.o
|
|
|
|
libdis-$(CONFIG_HPPA_DIS) += hppa-dis.o
|
|
|
|
libdis-$(CONFIG_I386_DIS) += i386-dis.o
|
2010-03-29 00:12:51 +00:00
|
|
|
libdis-$(CONFIG_IA64_DIS) += ia64-dis.o
|
2010-03-21 08:28:47 +00:00
|
|
|
libdis-$(CONFIG_M68K_DIS) += m68k-dis.o
|
|
|
|
libdis-$(CONFIG_MICROBLAZE_DIS) += microblaze-dis.o
|
|
|
|
libdis-$(CONFIG_MIPS_DIS) += mips-dis.o
|
|
|
|
libdis-$(CONFIG_PPC_DIS) += ppc-dis.o
|
|
|
|
libdis-$(CONFIG_S390_DIS) += s390-dis.o
|
|
|
|
libdis-$(CONFIG_SH4_DIS) += sh4-dis.o
|
|
|
|
libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
|
2012-03-31 17:54:20 +00:00
|
|
|
libdis-$(CONFIG_LM32_DIS) += lm32-dis.o
|
2010-03-29 19:23:52 +00:00
|
|
|
|
2010-05-22 16:52:39 +00:00
|
|
|
######################################################################
|
|
|
|
# trace
|
|
|
|
|
2011-03-16 15:30:21 +00:00
|
|
|
ifeq ($(TRACE_BACKEND),dtrace)
|
2012-04-18 18:15:45 +00:00
|
|
|
TRACE_H_EXTRA_DEPS=trace-dtrace.h
|
2011-03-16 15:30:21 +00:00
|
|
|
endif
|
2012-04-18 18:15:45 +00:00
|
|
|
trace.h: trace.h-timestamp $(TRACE_H_EXTRA_DEPS)
|
2011-09-15 20:45:42 +00:00
|
|
|
trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
2012-04-18 18:15:45 +00:00
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=h \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN trace.h")
|
2011-03-16 15:30:21 +00:00
|
|
|
@cmp -s $@ trace.h || cp $@ trace.h
|
|
|
|
|
|
|
|
trace.c: trace.c-timestamp
|
2011-09-15 20:45:42 +00:00
|
|
|
trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
2012-04-18 18:15:45 +00:00
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=c \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN trace.c")
|
2011-03-16 15:30:21 +00:00
|
|
|
@cmp -s $@ trace.c || cp $@ trace.c
|
|
|
|
|
|
|
|
trace.o: trace.c $(GENERATED_HEADERS)
|
|
|
|
|
|
|
|
trace-dtrace.h: trace-dtrace.dtrace
|
|
|
|
$(call quiet-command,dtrace -o $@ -h -s $<, " GEN trace-dtrace.h")
|
|
|
|
|
|
|
|
# Normal practice is to name DTrace probe file with a '.d' extension
|
2011-04-28 15:20:25 +00:00
|
|
|
# but that gets picked up by QEMU's Makefile as an external dependency
|
2011-03-16 15:30:21 +00:00
|
|
|
# rule file. So we use '.dtrace' instead
|
|
|
|
trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
|
2011-09-15 20:45:42 +00:00
|
|
|
trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
2012-04-18 18:15:45 +00:00
|
|
|
$(call quiet-command,$(TRACETOOL) \
|
|
|
|
--format=d \
|
|
|
|
--backend=$(TRACE_BACKEND) \
|
|
|
|
< $< > $@," GEN trace-dtrace.dtrace")
|
2011-03-16 15:30:21 +00:00
|
|
|
@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
|
|
|
|
|
|
|
|
trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
|
2012-04-18 18:15:45 +00:00
|
|
|
$(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")
|
2011-03-16 15:30:21 +00:00
|
|
|
|
2011-05-15 08:51:28 +00:00
|
|
|
ifeq ($(LIBTOOL),)
|
|
|
|
trace-dtrace.lo: trace-dtrace.dtrace
|
|
|
|
@echo "missing libtool. please install and rerun configure."; exit 1
|
|
|
|
else
|
|
|
|
trace-dtrace.lo: trace-dtrace.dtrace
|
2011-08-14 00:30:14 +00:00
|
|
|
$(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC dtrace -o $@ -G -s $<, " lt GEN trace-dtrace.o")
|
2011-05-15 08:51:28 +00:00
|
|
|
endif
|
|
|
|
|
2011-08-31 18:30:57 +00:00
|
|
|
trace/simple.o: trace/simple.c $(GENERATED_HEADERS)
|
2011-03-16 15:30:21 +00:00
|
|
|
|
2011-08-31 18:30:50 +00:00
|
|
|
trace-obj-$(CONFIG_TRACE_DTRACE) += trace-dtrace.o
|
|
|
|
ifneq ($(TRACE_BACKEND),dtrace)
|
2010-05-22 16:52:39 +00:00
|
|
|
trace-obj-y = trace.o
|
2010-11-12 13:20:24 +00:00
|
|
|
endif
|
2010-05-22 16:52:39 +00:00
|
|
|
|
2012-05-22 11:50:03 +00:00
|
|
|
trace-obj-$(CONFIG_TRACE_DEFAULT) += trace/default.o
|
|
|
|
trace-obj-$(CONFIG_TRACE_SIMPLE) += trace/simple.o
|
2011-08-31 18:30:50 +00:00
|
|
|
trace-obj-$(CONFIG_TRACE_SIMPLE) += qemu-timer-common.o
|
2012-05-22 11:50:03 +00:00
|
|
|
trace-obj-$(CONFIG_TRACE_STDERR) += trace/stderr.o
|
|
|
|
trace-obj-y += trace/control.o
|
2011-08-31 18:30:57 +00:00
|
|
|
|
2011-09-07 23:40:51 +00:00
|
|
|
$(trace-obj-y): $(GENERATED_HEADERS)
|
|
|
|
|
libcacard: initial commit
libcacard emulates a Common Access Card (CAC) which is a standard
for smartcards. It is used by the emulated ccid card introduced in
a following patch. Docs are available in docs/libcacard.txt
Signed-off-by: Alon Levy <alevy@redhat.com>
---
changes from v24->v25:
* Fix out of tree builds.
* Fix build with linux-user targets.
changes from v23->v24: (Jes Sorensen review 2)
* Makefile.target: use obj-$(CONFIG_*) +=
* remove unrequired includes, include qemu-common before qemu-thread
* required adding #define NO_NSPR_10_SUPPORT (harmless)
changes from v22->v23:
* configure fixes: (reported by Stefan Hajnoczi)
* test a = b, not a == b (second isn't portable)
* quote $source_path in case it contains spaces
- this doesn't really help since there are many other places
that need similar fixes, not introduced by this patch.
changes from v21->v22:
* fix configure to not link libcacard if nss not found
(reported by Stefan Hajnoczi)
* fix vscclient linkage with simpletrace backend
(reported by Stefan Hajnoczi)
* card_7816.c: add missing break in ERROR_DATA_NOT_FOUND
(reported by William van de Velde)
changes from v20->v21: (Jes Sorensen review)
* use qemu infrastructure: qemu-thread, qemu-common (qemu_malloc
and qemu_free), error_report
* assert instead of ASSERT
* cosmetic fixes
* use strpbrk and isspace
* add --disable-nss --enable-nss here, instead of in the final patch.
* split vscclient, passthru and docs to following patches.
changes from v19->v20:
* checkpatch.pl
changes from v15->v16:
Build:
* don't erase self with distclean
* fix make clean after make distclean
* Makefile: make vscclient link quiet
Behavioral:
* vcard_emul_nss: load coolkey in more situations
* vscclient:
* use hton,ntoh
* send init on connect, only start vevent thread on response
* read payload after header check, before type switch
* remove Reconnect
* update for vscard_common changes, empty Flush implementation
Style/Whitespace:
* fix wrong variable usage
* remove unused variable
* use only C style comments
* add copyright header
* fix tabulation
Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard: fix out of tree builds
2010-11-28 14:36:38 +00:00
|
|
|
######################################################################
|
|
|
|
# smartcard
|
|
|
|
|
|
|
|
libcacard-y = cac.o event.o vcard.o vreader.o vcard_emul_nss.o vcard_emul_type.o card_7816.o
|
|
|
|
|
2011-07-19 19:50:32 +00:00
|
|
|
######################################################################
|
|
|
|
# qapi
|
|
|
|
|
2012-05-22 11:50:34 +00:00
|
|
|
qapi-obj-y = qapi/
|
2011-07-19 19:50:32 +00:00
|
|
|
|
2012-03-04 20:32:36 +00:00
|
|
|
common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
|
2011-09-02 17:34:48 +00:00
|
|
|
common-obj-y += qmp.o hmp.o
|
2011-09-02 17:34:47 +00:00
|
|
|
|
2012-03-04 20:32:36 +00:00
|
|
|
universal-obj-y += $(qapi-obj-y)
|
|
|
|
|
2011-08-11 20:38:12 +00:00
|
|
|
######################################################################
|
|
|
|
# guest agent
|
|
|
|
|
2012-05-22 11:50:58 +00:00
|
|
|
qga-obj-y = qga/ qemu-ga.o module.o
|
2011-08-11 20:38:12 +00:00
|
|
|
qga-obj-$(CONFIG_WIN32) += oslib-win32.o
|
2012-01-20 04:04:34 +00:00
|
|
|
qga-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-sockets.o qemu-option.o
|
2011-08-11 20:38:12 +00:00
|
|
|
|
2010-03-29 19:23:52 +00:00
|
|
|
vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
|
|
|
|
|
|
|
|
vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
|
|
|
|
|
2011-08-21 03:18:37 +00:00
|
|
|
QEMU_CFLAGS+=$(GLIB_CFLAGS)
|
|
|
|
|
2012-05-22 11:42:53 +00:00
|
|
|
nested-vars += \
|
2012-05-29 09:10:55 +00:00
|
|
|
hw-obj-y \
|
2012-05-22 11:50:58 +00:00
|
|
|
qga-obj-y \
|
2012-05-22 11:44:39 +00:00
|
|
|
block-obj-y \
|
2012-05-22 11:42:53 +00:00
|
|
|
qom-obj-y \
|
2012-05-22 11:50:34 +00:00
|
|
|
qapi-obj-y \
|
2012-05-22 11:42:53 +00:00
|
|
|
user-obj-y \
|
2012-05-22 11:46:08 +00:00
|
|
|
common-obj-y \
|
|
|
|
extra-obj-y
|
2012-05-22 11:41:27 +00:00
|
|
|
dummy := $(call unnest-vars)
|