enable arch code from source with CAPSTONE_HAS_* for MSVC to pick up
diff --git a/arch/AArch64/AArch64BaseInfo.c b/arch/AArch64/AArch64BaseInfo.c
index eb6f443..64e5411 100644
--- a/arch/AArch64/AArch64BaseInfo.c
+++ b/arch/AArch64/AArch64BaseInfo.c
@@ -14,6 +14,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_ARM64
+
 #if defined (WIN32) || defined (WIN64) || defined (_WIN32) || defined (_WIN64)
 #pragma warning(disable:4996)
 #endif
@@ -993,3 +995,4 @@
 	return true;
 }
 
+#endif
diff --git a/arch/AArch64/AArch64Disassembler.c b/arch/AArch64/AArch64Disassembler.c
index 74ce653..c161f8e 100644
--- a/arch/AArch64/AArch64Disassembler.c
+++ b/arch/AArch64/AArch64Disassembler.c
@@ -16,6 +16,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_ARM64
+
 #include <stdio.h>	// DEBUG
 #include <stdlib.h>
 
@@ -1629,3 +1631,4 @@
 	return MCDisassembler_Success;
 }
 
+#endif
diff --git a/arch/AArch64/AArch64InstPrinter.c b/arch/AArch64/AArch64InstPrinter.c
index f16f672..8db1887 100644
--- a/arch/AArch64/AArch64InstPrinter.c
+++ b/arch/AArch64/AArch64InstPrinter.c
@@ -14,6 +14,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_ARM64
+
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -871,3 +873,4 @@
 	}
 }
 
+#endif
diff --git a/arch/AArch64/AArch64Mapping.c b/arch/AArch64/AArch64Mapping.c
index 7517a5a..b17525e 100644
--- a/arch/AArch64/AArch64Mapping.c
+++ b/arch/AArch64/AArch64Mapping.c
@@ -1,5 +1,7 @@
-/* Capstone Unified Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_ARM64
 
 #include <stdio.h>	// debug
 #include <string.h>
@@ -17045,3 +17047,5 @@
 
 	return (i != -1)? i : ARM64_REG_INVALID;
 }
+
+#endif
diff --git a/arch/AArch64/AArch64Module.c b/arch/AArch64/AArch64Module.c
index 9ea4c2a..22d0fd8 100644
--- a/arch/AArch64/AArch64Module.c
+++ b/arch/AArch64/AArch64Module.c
@@ -1,6 +1,8 @@
-/* Capstone Disassembler Engine */
+/* Capstone Disassembly Engine */
 /* By Dang Hoang Vu <danghvu@gmail.com> 2013 */
 
+#ifdef CAPSTONE_HAS_ARM64
+
 #include "../../utils.h"
 #include "../../MCRegisterInfo.h"
 #include "AArch64Disassembler.h"
@@ -48,3 +50,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_ARM64);
 }
+
+#endif
diff --git a/arch/ARM/ARMDisassembler.c b/arch/ARM/ARMDisassembler.c
index 7243dfa..c77056a 100644
--- a/arch/ARM/ARMDisassembler.c
+++ b/arch/ARM/ARMDisassembler.c
@@ -10,6 +10,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_ARM
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -5042,3 +5044,4 @@
 	return S;
 }
 
+#endif
diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c
index 6bf1df1..057fcb7 100644
--- a/arch/ARM/ARMInstPrinter.c
+++ b/arch/ARM/ARMInstPrinter.c
@@ -11,8 +11,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-/* Capstone Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_ARM
 
 #include <stdio.h>	// DEBUG
 #include <stdbool.h>
@@ -2409,3 +2411,5 @@
 	}
 	SStream_concat(O, "}");
 }
+
+#endif
diff --git a/arch/ARM/ARMMapping.c b/arch/ARM/ARMMapping.c
index d864ae2..d56bd8a 100644
--- a/arch/ARM/ARMMapping.c
+++ b/arch/ARM/ARMMapping.c
@@ -1,5 +1,7 @@
-/* Capstone Unified Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_ARM
 
 #include <stdio.h>	// debug
 #include <string.h>
@@ -13633,3 +13635,5 @@
 	// not found
 	return false;
 }
+
+#endif
diff --git a/arch/ARM/ARMModule.c b/arch/ARM/ARMModule.c
index 5d2dc54..5c1a6d9 100644
--- a/arch/ARM/ARMModule.c
+++ b/arch/ARM/ARMModule.c
@@ -1,6 +1,8 @@
-/* Capstone Disassembler Engine */
+/* Capstone Disassembly Engine */
 /* By Dang Hoang Vu <danghvu@gmail.com> 2013 */
 
+#ifdef CAPSTONE_HAS_ARM
+
 #include "../../cs_priv.h"
 #include "../../MCRegisterInfo.h"
 #include "ARMDisassembler.h"
@@ -71,3 +73,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_ARM);
 }
+
+#endif
diff --git a/arch/Mips/MipsDisassembler.c b/arch/Mips/MipsDisassembler.c
index b45754a..99ecc2f 100644
--- a/arch/Mips/MipsDisassembler.c
+++ b/arch/Mips/MipsDisassembler.c
@@ -14,6 +14,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_MIPS
+
 #include <stdio.h>
 #include <string.h>
 
@@ -770,3 +772,5 @@
 	MCInst_addOperand(Inst, MCOperand_CreateImm(SignExtend32(Size, 16)));
 	return MCDisassembler_Success;
 }
+
+#endif
diff --git a/arch/Mips/MipsInstPrinter.c b/arch/Mips/MipsInstPrinter.c
index a8d7f3e..e27d2d3 100644
--- a/arch/Mips/MipsInstPrinter.c
+++ b/arch/Mips/MipsInstPrinter.c
@@ -11,8 +11,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-/* Capstone Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_MIPS
 
 #include <inttypes.h>
 #include <stdlib.h>
@@ -446,3 +448,4 @@
 #define PRINT_ALIAS_INSTR
 #include "MipsGenAsmWriter.inc"
 
+#endif
diff --git a/arch/Mips/MipsMapping.c b/arch/Mips/MipsMapping.c
index 83bc437..2d1e146 100644
--- a/arch/Mips/MipsMapping.c
+++ b/arch/Mips/MipsMapping.c
@@ -1,6 +1,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_MIPS
+
 #include <stdio.h>	// debug
 #include <string.h>
 
@@ -8511,3 +8513,5 @@
 	// cannot find this register
 	return 0;
 }
+
+#endif
diff --git a/arch/Mips/MipsModule.c b/arch/Mips/MipsModule.c
index 02ddb2e..42316f3 100644
--- a/arch/Mips/MipsModule.c
+++ b/arch/Mips/MipsModule.c
@@ -1,6 +1,8 @@
-/* Capstone Disassembler Engine */
+/* Capstone Disassembly Engine */
 /* By Dang Hoang Vu <danghvu@gmail.com> 2013 */
 
+#ifdef CAPSTONE_HAS_MIPS
+
 #include "../../utils.h"
 #include "../../MCRegisterInfo.h"
 #include "MipsDisassembler.h"
@@ -60,3 +62,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_MIPS);
 }
+
+#endif
diff --git a/arch/PowerPC/PPCDisassembler.c b/arch/PowerPC/PPCDisassembler.c
index ff8c460..0793f43 100644
--- a/arch/PowerPC/PPCDisassembler.c
+++ b/arch/PowerPC/PPCDisassembler.c
@@ -10,6 +10,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_POWERPC
+
 #include <stdio.h>	// DEBUG
 #include <stdlib.h>
 
@@ -336,3 +338,5 @@
 			PPCSubRegIdxLists, 6,
 			0);
 }
+
+#endif
diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c
index 0ecc219..84d98ca 100644
--- a/arch/PowerPC/PPCInstPrinter.c
+++ b/arch/PowerPC/PPCInstPrinter.c
@@ -14,6 +14,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_POWERPC
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -542,3 +544,4 @@
 //#define PRINT_ALIAS_INSTR
 #include "PPCGenAsmWriter.inc"
 
+#endif
diff --git a/arch/PowerPC/PPCMapping.c b/arch/PowerPC/PPCMapping.c
index 31aeab3..043ca3f 100644
--- a/arch/PowerPC/PPCMapping.c
+++ b/arch/PowerPC/PPCMapping.c
@@ -1,5 +1,7 @@
-/* Capstone Unified Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_POWERPC
 
 #include <stdio.h>	// debug
 #include <string.h>
@@ -5224,3 +5226,5 @@
 	// cannot find this register
 	return 0;
 }
+
+#endif
diff --git a/arch/PowerPC/PPCModule.c b/arch/PowerPC/PPCModule.c
index f547bcc..88a7fe8 100644
--- a/arch/PowerPC/PPCModule.c
+++ b/arch/PowerPC/PPCModule.c
@@ -1,5 +1,7 @@
-/* Capstone Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013 */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_POWERPC
 
 #include "../../utils.h"
 #include "../../MCRegisterInfo.h"
@@ -53,3 +55,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_PPC);
 }
+
+#endif
diff --git a/arch/Sparc/SparcDisassembler.c b/arch/Sparc/SparcDisassembler.c
index c3ce6a6..f77e4c3 100644
--- a/arch/Sparc/SparcDisassembler.c
+++ b/arch/Sparc/SparcDisassembler.c
@@ -10,6 +10,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SPARC
+
 #include <stdio.h>	// DEBUG
 #include <stdlib.h>
 #include <string.h>
@@ -492,3 +494,4 @@
 			0);
 }
 
+#endif
diff --git a/arch/Sparc/SparcInstPrinter.c b/arch/Sparc/SparcInstPrinter.c
index c2d5e6d..5499216 100644
--- a/arch/Sparc/SparcInstPrinter.c
+++ b/arch/Sparc/SparcInstPrinter.c
@@ -14,6 +14,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SPARC
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -271,3 +273,5 @@
 			printInstruction(MI, O, NULL);
 	}
 }
+
+#endif
diff --git a/arch/Sparc/SparcMapping.c b/arch/Sparc/SparcMapping.c
index 1e2113c..9011131 100644
--- a/arch/Sparc/SparcMapping.c
+++ b/arch/Sparc/SparcMapping.c
@@ -1,6 +1,8 @@
-/* Capstone Unified Disassembly Engine */
+/* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SPARC
+
 #include <stdio.h>	// debug
 #include <string.h>
 
@@ -3175,3 +3177,5 @@
 	// cannot find this register
 	return 0;
 }
+
+#endif
diff --git a/arch/Sparc/SparcModule.c b/arch/Sparc/SparcModule.c
index e9cae3c..a1dc05e 100644
--- a/arch/Sparc/SparcModule.c
+++ b/arch/Sparc/SparcModule.c
@@ -1,6 +1,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SPARC
+
 #include "../../utils.h"
 #include "../../MCRegisterInfo.h"
 #include "SparcDisassembler.h"
@@ -52,3 +54,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_SPARC);
 }
+
+#endif
diff --git a/arch/SystemZ/SystemZDisassembler.c b/arch/SystemZ/SystemZDisassembler.c
index 4d0a404..ccaccd5 100644
--- a/arch/SystemZ/SystemZDisassembler.c
+++ b/arch/SystemZ/SystemZDisassembler.c
@@ -10,6 +10,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SYSZ
+
 #include <stdio.h>	// DEBUG
 #include <stdlib.h>
 #include <string.h>
@@ -356,3 +358,4 @@
 			0);
 }
 
+#endif
diff --git a/arch/SystemZ/SystemZInstPrinter.c b/arch/SystemZ/SystemZInstPrinter.c
index bdad092..ac1279d 100644
--- a/arch/SystemZ/SystemZInstPrinter.c
+++ b/arch/SystemZ/SystemZInstPrinter.c
@@ -14,6 +14,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SYSZ
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -376,3 +378,5 @@
 {
 	printInstruction(MI, O, Info);
 }
+
+#endif
diff --git a/arch/SystemZ/SystemZMCTargetDesc.c b/arch/SystemZ/SystemZMCTargetDesc.c
index 3a35a40..4cf6f18 100644
--- a/arch/SystemZ/SystemZMCTargetDesc.c
+++ b/arch/SystemZ/SystemZMCTargetDesc.c
@@ -10,6 +10,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SYSZ
+
 #include "SystemZMCTargetDesc.h"
 
 #define GET_REGINFO_ENUM
@@ -87,3 +89,4 @@
 	return Map[Reg];
 }
 
+#endif
diff --git a/arch/SystemZ/SystemZMapping.c b/arch/SystemZ/SystemZMapping.c
index c0787c6..39a881c 100644
--- a/arch/SystemZ/SystemZMapping.c
+++ b/arch/SystemZ/SystemZMapping.c
@@ -1,6 +1,8 @@
-/* Capstone Unified Disassembly Engine */
+/* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SYSZ
+
 #include <stdio.h>	// debug
 #include <string.h>
 
@@ -5065,3 +5067,5 @@
 	// cannot find this register
 	return 0;
 }
+
+#endif
diff --git a/arch/SystemZ/SystemZModule.c b/arch/SystemZ/SystemZModule.c
index bafcc16..267c046 100644
--- a/arch/SystemZ/SystemZModule.c
+++ b/arch/SystemZ/SystemZModule.c
@@ -1,6 +1,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_SYSZ
+
 #include "../../utils.h"
 #include "../../MCRegisterInfo.h"
 #include "SystemZDisassembler.h"
@@ -48,3 +50,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_SYSZ);
 }
+
+#endif
diff --git a/arch/X86/X86ATTInstPrinter.c b/arch/X86/X86ATTInstPrinter.c
index 5228eeb..91f171f 100644
--- a/arch/X86/X86ATTInstPrinter.c
+++ b/arch/X86/X86ATTInstPrinter.c
@@ -12,8 +12,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-/* Capstone Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
+
+#ifdef CAPSTONE_HAS_X86
 
 #include <ctype.h>
 #include <inttypes.h>
@@ -537,3 +539,4 @@
 	}
 }
 
+#endif
diff --git a/arch/X86/X86Disassembler.c b/arch/X86/X86Disassembler.c
index de0763e..26893e8 100644
--- a/arch/X86/X86Disassembler.c
+++ b/arch/X86/X86Disassembler.c
@@ -17,6 +17,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_X86
+
 #include <inttypes.h>	// debug
 #include <string.h>
 
@@ -810,3 +812,5 @@
 		return result;
 	}
 }
+
+#endif
diff --git a/arch/X86/X86DisassemblerDecoder.c b/arch/X86/X86DisassemblerDecoder.c
index 6d848c2..e875a92 100644
--- a/arch/X86/X86DisassemblerDecoder.c
+++ b/arch/X86/X86DisassemblerDecoder.c
@@ -16,6 +16,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_X86
+
 #include <stdarg.h>   /* for va_*()       */
 #include <stdlib.h>   /* for exit()       */
 #include <string.h>   /* for memset()     */
@@ -2002,3 +2004,5 @@
 
 	return 0;
 }
+
+#endif
diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c
index 3035ee5..676ef9d 100644
--- a/arch/X86/X86IntelInstPrinter.c
+++ b/arch/X86/X86IntelInstPrinter.c
@@ -15,6 +15,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_X86
+
 #include <ctype.h>
 #include <inttypes.h>
 #include <stdbool.h>
@@ -541,3 +543,4 @@
 #include "X86GenAsmWriter1.inc"
 #endif
 
+#endif
diff --git a/arch/X86/X86Mapping.c b/arch/X86/X86Mapping.c
index 7ce3da2..5739014 100644
--- a/arch/X86/X86Mapping.c
+++ b/arch/X86/X86Mapping.c
@@ -1,6 +1,8 @@
 /* Capstone Disassembly Engine */
 /* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
 
+#ifdef CAPSTONE_HAS_X86
+
 #include <string.h>
 
 #include "X86Mapping.h"
@@ -41765,3 +41767,5 @@
 
 	return false;
 }
+
+#endif
diff --git a/arch/X86/X86Module.c b/arch/X86/X86Module.c
index c0b0036..3391b4c 100644
--- a/arch/X86/X86Module.c
+++ b/arch/X86/X86Module.c
@@ -1,6 +1,8 @@
-/* Capstone Disassembler Engine */
+/* Capstone Disassembly Engine */
 /* By Dang Hoang Vu <danghvu@gmail.com> 2013 */
 
+#ifdef CAPSTONE_HAS_X86
+
 #include "../../cs_priv.h"
 #include "../../MCRegisterInfo.h"
 #include "X86Disassembler.h"
@@ -61,3 +63,5 @@
 	// support this arch
 	all_arch |= (1 << CS_ARCH_X86);
 }
+
+#endif