[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 39/67] target: replace command line flags with prepr
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH 39/67] target: replace command line flags with preprocessor |
Date: |
Thu, 3 May 2018 22:51:17 +0300 |
Each target is currently built with a different set of include
directories, this is what makes it possible to pull in a separate copy
of header files depending on the target.
Replace with per-target ifdefs which are easier to understand.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/target-dir.h | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
create mode 100644 include/target-dir.h
diff --git a/include/target-dir.h b/include/target-dir.h
new file mode 100644
index 0000000..3044236
--- /dev/null
+++ b/include/target-dir.h
@@ -0,0 +1,63 @@
+/*
+ * QEMU target-specific directory macros
+ *
+ * Copyright (C) 2018 Red Hat, Inc.
+ * Author: Michael S. Tsirkin <address@hidden>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#ifndef QEMU_TARGET_DIR_H
+#define QEMU_TARGET_DIR_H
+
+#if defined(TARGET_ALPHA)
+#define TARGET_DIR_PREFIX ../target/alpha
+#elif defined(TARGET_ARM)
+#define TARGET_DIR_PREFIX ../target/arm
+#elif defined(TARGET_CRIS)
+#define TARGET_DIR_PREFIX ../target/cris
+#elif defined(TARGET_HPPA)
+#define TARGET_DIR_PREFIX ../target/hppa
+#elif defined(TARGET_I386)
+#define TARGET_DIR_PREFIX ../target/i386
+#elif defined(TARGET_LM32)
+#define TARGET_DIR_PREFIX ../target/lm32
+#elif defined(TARGET_M68K)
+#define TARGET_DIR_PREFIX ../target/m68k
+#elif defined(TARGET_MICROBLAZE)
+#define TARGET_DIR_PREFIX ../target/microblaze
+#elif defined(TARGET_MIPS)
+#define TARGET_DIR_PREFIX ../target/mips
+#elif defined(TARGET_MOXIE)
+#define TARGET_DIR_PREFIX ../target/moxie
+#elif defined(TARGET_NIOS2)
+#define TARGET_DIR_PREFIX ../target/nios2
+#elif defined(TARGET_OPENRISC)
+#define TARGET_DIR_PREFIX ../target/openrisc
+#elif defined(TARGET_PPC)
+#define TARGET_DIR_PREFIX ../target/ppc
+#elif defined(TARGET_RISCV)
+#define TARGET_DIR_PREFIX ../target/riscv
+#elif defined(TARGET_S390X)
+#define TARGET_DIR_PREFIX ../target/s390x
+#elif defined(TARGET_SH4)
+#define TARGET_DIR_PREFIX ../target/sh4
+#elif defined(TARGET_SPARC)
+#define TARGET_DIR_PREFIX ../target/sparc
+#elif defined(TARGET_UNICORE32)
+#define TARGET_DIR_PREFIX ../target/unicore32
+#elif defined(TARGET_TILEGX)
+#define TARGET_DIR_PREFIX ../target/tilegx
+#elif defined(TARGET_TRICORE)
+#define TARGET_DIR_PREFIX ../target/tricore
+#elif defined(TARGET_XTENSA)
+#define TARGET_DIR_PREFIX ../target/xtensa
+#else
+#error "Target-specific directory include missing"
+#endif
+
+#define TARGET_DIR_HASH(file) #file
+#define TARGET_DIR_STRING(file) TARGET_DIR_HASH(file)
+#define TARGET_DIR(file) TARGET_DIR_STRING(TARGET_DIR_PREFIX/file)
+
+#endif
--
MST
- [Qemu-devel] [PATCH 30/67] audio: add include directory header, (continued)
- [Qemu-devel] [PATCH 30/67] audio: add include directory header, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 35/67] hw/usb: add include directory header, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 33/67] hw/net: add include directory header, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 32/67] ui: add include directory header, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 36/67] migration: add include directory headers, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 37/67] tcg: add include directory headers, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 39/67] target: replace command line flags with preprocessor,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH 38/67] helper: replace command line flags with preprocessor, Michael S. Tsirkin, 2018/05/03
- [Qemu-devel] [PATCH 34/67] hw/ppc: add include directory headers, Michael S. Tsirkin, 2018/05/03
[Qemu-devel] [PATCH 41/67] tcg-pool.inc.c: replace command line flags with preprocessor, Michael S. Tsirkin, 2018/05/03