@@ -194,7 +194,8 @@ obj-y += e1000.o
obj-i386-y += vga.o
obj-i386-y += mc146818rtc.o i8259.o pc.o
obj-i386-y += cirrus_vga.o apic.o ioapic.o piix_pci.o
-obj-i386-y += vmmouse.o vmport.o hpet.o
+obj-i386-y += vmmouse.o vmport.o
+obj-i386-$(CONFIG_HPET) += hpet.o
obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o
obj-i386-y += debugcon.o multiboot.o
obj-i386-y += pc_piix.o
@@ -1,2 +1,12 @@
#include "config-host.h"
#include "config-target.h"
+
+/* We want to include different config files for specific targets
+ And for the common library. They need a different name because
+ we don't want to rely in paths */
+
+#if defined(NEED_CPU_H)
+#include "config-devices.h"
+#else
+#include "config-all-devices.h"
+#endif
@@ -23,3 +23,4 @@ CONFIG_NE2000_ISA=y
CONFIG_PIIX_PCI=y
CONFIG_SOUND=y
CONFIG_VIRTIO_PCI=y
+CONFIG_HPET=y
@@ -23,3 +23,4 @@ CONFIG_NE2000_ISA=y
CONFIG_PIIX_PCI=y
CONFIG_SOUND=y
CONFIG_VIRTIO_PCI=y
+CONFIG_HPET=y
@@ -15,13 +15,17 @@
extern int no_hpet;
-#if !defined(TARGET_I386)
+#if !defined(CONFIG_HPET)
static inline bool hpet_in_legacy_mode(void)
{
return false;
}
+static inline void hpet_init(qemu_irq *irq)
+{
+}
+
#else
#define HPET_BASE 0xfed00000
@@ -87,6 +91,6 @@ typedef struct HPETState {
extern bool hpet_in_legacy_mode(void);
extern void hpet_init(qemu_irq *irq);
-#endif /* TARGET_I386 */
+#endif /* CONFIG_HPET */
#endif
@@ -778,7 +778,7 @@ static void do_info_commands(Monitor *mon, QObject **ret_data)
*ret_data = QOBJECT(cmd_list);
}
-#if defined(TARGET_I386)
+#if defined(CONFIG_HPET)
static void do_info_hpet_print(Monitor *mon, const QObject *data)
{
monitor_printf(mon, "HPET is %s by QEMU\n",
@@ -2610,6 +2610,8 @@ static const mon_cmd_t info_cmds[] = {
.help = "show the active virtual memory mappings",
.mhandler.info = mem_info,
},
+#endif
+#if defined(CONFIG_HPET)
{
.name = "hpet",
.args_type = "",
Compile hpet.o depending of CONFIG_HPET. Simplify testing for using this functions once there. Create inline stabs for the exported functions. Signed-off-by: Juan Quintela <quintela@redhat.com> --- Makefile.target | 3 ++- config.h | 10 ++++++++++ default-configs/i386-softmmu.mak | 1 + default-configs/x86_64-softmmu.mak | 1 + hw/hpet_emul.h | 8 ++++++-- monitor.c | 4 +++- 6 files changed, 23 insertions(+), 4 deletions(-)