From patchwork Sat Nov 7 14:30:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandy Harris X-Patchwork-Id: 7575631 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C2FFBC05C6 for ; Sat, 7 Nov 2015 14:32:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA5DB20647 for ; Sat, 7 Nov 2015 14:32:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EDA0203F3 for ; Sat, 7 Nov 2015 14:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbbKGObM (ORCPT ); Sat, 7 Nov 2015 09:31:12 -0500 Received: from mail-qg0-f48.google.com ([209.85.192.48]:34010 "EHLO mail-qg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753547AbbKGOau (ORCPT ); Sat, 7 Nov 2015 09:30:50 -0500 Received: by qgeb1 with SMTP id b1so59107169qge.1; Sat, 07 Nov 2015 06:30:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fNFsX/3rqZyl95LNDzNQ/sR8VYH1VFlt7RPLrQtxSO0=; b=v6LO/XoYQGfebKASk56jz3OuLjvKjXyDvGMg0QruvhKTuhWcJuZeO5DBQYE3d8Gdzo 4JeFk8IujV5DFAzLdhHT13FuFDEcUbEsmDMvOS8dalkkRIPHW+4kXEroi9t/a6vzRJIc cTQAwq9VWnjv36BN4G3n1eq/x4IXGlBLL6q9tDu9BfBlybUXszj9mV364H3PlrOvUSkS ukl0nawkFBOkUNdWHiZ+BkSRfmDgKOIRosDaoHXnsWHkxU8WkTX4T9011UE0s+J1ERXu yfXmWP98LzgGGflphZZUOJGTDVs9kDdW94xI1785ichwKT61JYdyt+hOZZOx9xMwL1WR o8zQ== X-Received: by 10.140.128.16 with SMTP id 16mr19329167qha.54.1446906649703; Sat, 07 Nov 2015 06:30:49 -0800 (PST) Received: from Sandy-laptop.hitronhub.home (CPE00fc8d085973-CM00fc8d085970.cpe.net.cable.rogers.com. [99.224.153.28]) by smtp.gmail.com with ESMTPSA id d8sm1367697qgd.34.2015.11.07.06.30.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 07 Nov 2015 06:30:49 -0800 (PST) From: Sandy Harris To: "Theodore Ts\\'o" , Jason Cooper , "H. Peter Anvin" , John Denker Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: [PATCH 5/7] Conditionals for CONFIG_RANDOM_INIT and CONFIG_RANDOM_GCM Date: Sat, 7 Nov 2015 09:30:40 -0500 Message-Id: <1446906642-19372-5-git-send-email-sandyinchina@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1446906642-19372-1-git-send-email-sandyinchina@gmail.com> References: <1446906642-19372-1-git-send-email-sandyinchina@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sandy Harris --- drivers/char/Makefile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/char/Makefile b/drivers/char/Makefile index d8a7579..7d095e5 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -2,7 +2,30 @@ # Makefile for the kernel character device drivers. # -obj-y += mem.o random.o +obj-y += mem.o + +ifeq ($(CONFIG_RANDOM_GCM),y) + random_c = random_gcm.c + random_o = random_gcm.o + random_no = random.o +else + random_c = random.c + random_o = random.o + random_no = random_gcm.o +endif +obj-y += $(random_o) + +# remove the generated file after use so that +# a fresh one is built (by scripts/gen_random) +# for every compile +# remove random_no so it will not get linked +ifeq ($(CONFIG_RANDOM_INIT),y) +init-file = include/generated/random_init.h +$(random_o): $(random_c) $(init-file) + $(CC) $< -o $@ + $(Q) rm --force $(init-file) $(random_no) +endif + obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o obj-y += misc.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o