From nobody Wed Oct 29 11:32:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525378947463127.92238012599216; Thu, 3 May 2018 13:22:27 -0700 (PDT) Received: from localhost ([::1]:58727 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEKk9-0004KC-Dj for importer@patchew.org; Thu, 03 May 2018 16:22:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEKG8-0002ns-3D for qemu-devel@nongnu.org; Thu, 03 May 2018 15:51:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEKG7-0002ov-7G for qemu-devel@nongnu.org; Thu, 03 May 2018 15:51:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35306 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fEKG7-0002oY-19 for qemu-devel@nongnu.org; Thu, 03 May 2018 15:51:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 89F557CBBA; Thu, 3 May 2018 19:51:18 +0000 (UTC) Received: from redhat.com (ovpn-122-8.rdu2.redhat.com [10.10.122.8]) by smtp.corp.redhat.com (Postfix) with SMTP id 2F92911166E0; Thu, 3 May 2018 19:51:18 +0000 (UTC) Date: Thu, 3 May 2018 22:51:17 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1525376963-79623-40-git-send-email-mst@redhat.com> References: <1525376963-79623-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1525376963-79623-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 03 May 2018 19:51:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 03 May 2018 19:51:18 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'mst@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 39/67] target: replace command line flags with preprocessor X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * 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 --=20 MST