From patchwork Tue May 7 17:50:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raymond Mao X-Patchwork-Id: 1932577 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DUpJv3Mj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VYmDs3NKJz1xnT for ; Wed, 8 May 2024 03:56:45 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0237F886F1; Tue, 7 May 2024 19:56:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="DUpJv3Mj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF4C688719; Tue, 7 May 2024 19:56:41 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B0FFA883E8 for ; Tue, 7 May 2024 19:56:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=raymond.mao@linaro.org Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-6a0f889877cso12851996d6.1 for ; Tue, 07 May 2024 10:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715104598; x=1715709398; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bD/L5Xe5us9AepjFIeV0rC0bHnHQRSru2Sr3uCB11fM=; b=DUpJv3MjjrSPUcCOj4AWNmlflDs/7k8Tf/WfbDOx3deJ+VUhldComs4a4wpFoRyVC7 yImRb6zkfYXuMtuEp4JJ+YgKTdLXDBv5wL7XAMi7kHkZ3wErNw6eyovLs6ScqJQ9xhEP ruc2emwVNB6vaAySzHV2VpSO3tX3uKmZmDrdequ7HDKHtrsjSfWn/tvwHlaWaLq6ThqF 3FN63FYT4V3B8qr4yX9d6tGs9igqacML9J4kc/fX4DwYeeCg8Yz/e+wOUeZu1Ub9k1g8 xjfT6lFDp2nrcXLVuiK8LXlYonyx+VOG2ceD2l4xnnNfsm6LGUyxfmEDWJvYS3xLuve7 Km7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715104598; x=1715709398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bD/L5Xe5us9AepjFIeV0rC0bHnHQRSru2Sr3uCB11fM=; b=DAzZaQ8j7yu+LRi96d3elND0vAEUUNUN7T7ee1ix6VbPxJstplHmLKqDefdj36D4cb dXWreMhQM+JcGObIn3CxH2FB5cPwrX6ro58wd363J+KO+WbdL6Wvt5UhqC6Eq1IXuNna KaRtFWA1Nn0LkH6tuB0gooUwbR2t73uARYOeCx9lqN6Yj2wxk9V0IQWAgNrqFRS1LNb2 Ji5yeE5vNzFc3WxV4Drv4PmgQxiJeniEk36IqN037WJ6FJ3gFUajVWbyCq+amaA0z7hS VwGNmh6dEG+5PHJG7UIJxix2y5NgkyHRg6pUr233rEJuIk5ADQ/NNPOtncSA7GZjkeZf k1Mg== X-Gm-Message-State: AOJu0YxsXrti1vMILUtg5q44Qjgpe2SkKP9ltHRtYuRnStTpx6kEvE0r 8FO/EVCZ7suUszwksShqiIafqSyRJB/imuzA3096P2/x5b+T6j8UF0VqUWGfNpGIoIKmTjoecv7 r X-Google-Smtp-Source: AGHT+IGVLX3tOXuiC84JJe4onw7W2ZcoCTq4n4Rg3gbmr5lhJAi7U1KaEsxdd38KQm85IugCQQ9wmg== X-Received: by 2002:a05:6214:234d:b0:6a0:c903:5cb8 with SMTP id 6a1803df08f44-6a15157f869mr5839586d6.65.1715104598408; Tue, 07 May 2024 10:56:38 -0700 (PDT) Received: from ubuntu.localdomain (pool-174-115-4-214.cpe.net.cable.rogers.com. [174.115.4.214]) by smtp.gmail.com with ESMTPSA id o1-20020a0cecc1000000b006a0f126a033sm4801834qvq.28.2024.05.07.10.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 10:56:38 -0700 (PDT) From: Raymond Mao To: u-boot@lists.denx.de Cc: Raymond Mao , Tom Rini , Heinrich Schuchardt , Ilias Apalodimas , Tuomas Tynkkynen , Simon Glass , Leo Yu-Chi Liang , Andrejs Cainikovs , Marek Vasut , Sean Anderson , Christophe Leroy , Sumit Garg , Andrew Davis , Jesse Taube , Bryan Brattlof , "Leon M. Busch-George" , Ralph Siemsen , Sergei Antonov , Igor Opaniuk , Ilya Lukin <4.shket@gmail.com>, Bin Meng , Alper Nebi Yasak , Abdellatif El Khlifi , AKASHI Takahiro , Alexander Gendin , =?utf-8?q?Vincent_Stehl=C3=A9?= , Eddie James , Oleksandr Suvorov , Masahisa Kojima Subject: [PATCH v2 11/28] makefile: add mbedtls include directories Date: Tue, 7 May 2024 10:50:53 -0700 Message-Id: <20240507175132.1456512-12-raymond.mao@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240507175132.1456512-1-raymond.mao@linaro.org> References: <20240507175132.1456512-1-raymond.mao@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add the mbedtls include directories into the build system. Signed-off-by: Raymond Mao --- Changes in v2 - None. Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 7321fe1499e..80db1dfd8ec 100644 --- a/Makefile +++ b/Makefile @@ -829,6 +829,12 @@ KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g) UBOOTINCLUDE := \ -Iinclude \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ + $(if $(KBUILD_SRC), \ + $(if $(CONFIG_MBEDTLS_LIB), \ + "-DMBEDTLS_CONFIG_FILE=\"mbedtls_def_config.h\"" \ + -I$(srctree)/lib/mbedtls \ + -I$(srctree)/lib/mbedtls/port \ + -I$(srctree)/lib/mbedtls/external/mbedtls/include)) \ $(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \ $(if $(CONFIG_HAS_THUMB2), \ $(if $(CONFIG_CPU_V7M), \ @@ -840,6 +846,13 @@ UBOOTINCLUDE := \ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) +ifeq ($(CONFIG_MBEDTLS_LIB),y) +PLATFORM_CPPFLAGS += "-DMBEDTLS_CONFIG_FILE=\"mbedtls_def_config.h\"" \ + -I$(srctree)/lib/mbedtls \ + -I$(srctree)/lib/mbedtls/port \ + -I$(srctree)/lib/mbedtls/external/mbedtls/include +endif + # FIX ME cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ $(NOSTDINC_FLAGS)