applesmc: make optional

Based on patch by David Ahern.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
diff --git a/Makefile.objs b/Makefile.objs
index b21f9d3..c144df1 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -196,6 +196,7 @@
 hw-obj-$(CONFIG_APM) += pm_smbus.o apm.o
 hw-obj-$(CONFIG_DMA) += dma.o
 hw-obj-$(CONFIG_HPET) += hpet.o
+hw-obj-$(CONFIG_APPLESMC) += applesmc.o
 
 # PPC devices
 hw-obj-$(CONFIG_OPENPIC) += openpic.o
diff --git a/Makefile.target b/Makefile.target
index 5a0fd40..220589e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -215,7 +215,7 @@
 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 += vmport.o applesmc.o
+obj-i386-y += vmport.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 kvmclock.o
diff --git a/default-configs/i386-softmmu.mak b/default-configs/i386-softmmu.mak
index 3e0eddf..55589fa 100644
--- a/default-configs/i386-softmmu.mak
+++ b/default-configs/i386-softmmu.mak
@@ -20,3 +20,4 @@
 CONFIG_PIIX_PCI=y
 CONFIG_SOUND=y
 CONFIG_HPET=y
+CONFIG_APPLESMC=y
diff --git a/default-configs/x86_64-softmmu.mak b/default-configs/x86_64-softmmu.mak
index 1cc1b61..59b7893 100644
--- a/default-configs/x86_64-softmmu.mak
+++ b/default-configs/x86_64-softmmu.mak
@@ -20,3 +20,4 @@
 CONFIG_PIIX_PCI=y
 CONFIG_SOUND=y
 CONFIG_HPET=y
+CONFIG_APPLESMC=y