All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-kbuild@vger.kernel.org
Cc: Sam Ravnborg <sam@ravnborg.org>,
	Michal Marek <michal.lkml@markovi.net>,
	linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: [PATCH 3/7] lib: zstd: clean up Makefile for simpler composite object handling
Date: Mon, 19 Mar 2018 20:26:09 +0900	[thread overview]
Message-ID: <1521458773-14224-3-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1521458773-14224-1-git-send-email-yamada.masahiro@socionext.com>

Now, Kbuild nicely handles composite objects to avoid multiple
definition.

Makefiles can simply add the same objects multiple times across
composite objects.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

The is clean-up from build system point of view.

I will apply this for the Kbuild tree.


 lib/zstd/Makefile | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/lib/zstd/Makefile b/lib/zstd/Makefile
index dd0a359..a1a64cf 100644
--- a/lib/zstd/Makefile
+++ b/lib/zstd/Makefile
@@ -4,15 +4,7 @@ obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd_decompress.o
 ccflags-y += -O3
 
 # Object files unique to zstd_compress and zstd_decompress
-zstd_compress-y := fse_compress.o huf_compress.o compress.o
-zstd_decompress-y := huf_decompress.o decompress.o
-
-# These object files are shared between the modules.
-# Always add them to zstd_compress.
-# Unless both zstd_compress and zstd_decompress are built in
-# then also add them to zstd_decompress.
-zstd_compress-y += entropy_common.o fse_decompress.o zstd_common.o
-
-ifneq ($(CONFIG_ZSTD_COMPRESS)$(CONFIG_ZSTD_DECOMPRESS),yy)
-	zstd_decompress-y += entropy_common.o fse_decompress.o zstd_common.o
-endif
+zstd_compress-y := fse_compress.o huf_compress.o compress.o \
+		   entropy_common.o fse_decompress.o zstd_common.o
+zstd_decompress-y := huf_decompress.o decompress.o \
+		     entropy_common.o fse_decompress.o zstd_common.o
-- 
2.7.4

  parent reply	other threads:[~2018-03-19 11:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19 11:26 [PATCH 1/7] kbuild: rename real-objs-y/m to real-obj-y/m Masahiro Yamada
2018-03-19 11:26 ` [PATCH 2/7] kbuild: link $(real-obj-y) instead of $(obj-y) into built-in.a Masahiro Yamada
2018-03-19 11:26 ` Masahiro Yamada [this message]
2018-03-19 11:32   ` [PATCH 3/7] lib: zstd: clean up Makefile for simpler composite object handling Masahiro Yamada
2018-03-19 11:26 ` [PATCH 4/7] net: liquidio: " Masahiro Yamada
2018-03-19 11:26 ` [PATCH 5/7] kbuild: remove partial section mismatch detection for built-in.a Masahiro Yamada
2018-03-19 11:26 ` [PATCH 6/7] kbuild: clean up built-in.a archive rule Masahiro Yamada
2018-03-19 11:26 ` [PATCH 7/7] kbuild: clean up multi-used module link rule Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1521458773-14224-3-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=npiggin@gmail.com \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.