From: "Uwe Kleine-König" <uwe@kleine-koenig.org>
To: linux-sparse@vger.kernel.org
Subject: [PATCH 6/6] build: replace *_EXTRA_OBJS by local assignments to LDFLAGS and LOADLIBES
Date: Wed, 4 Oct 2017 15:26:05 +0200 [thread overview]
Message-ID: <20171004132605.24734-7-uwe@kleine-koenig.org> (raw)
In-Reply-To: <20171004132605.24734-1-uwe@kleine-koenig.org>
This allows to drop the magic to handle *_EXTRA_OBJS.
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
Makefile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index f6c577c02143..50e7b99b6107 100644
--- a/Makefile
+++ b/Makefile
@@ -62,8 +62,8 @@ INST_MAN1=sparse.1 cgcc.1
ifeq ($(HAVE_LIBXML),yes)
PROGRAMS+=c2xml
INST_PROGRAMS+=c2xml
-c2xml_EXTRA_OBJS = `$(PKG_CONFIG) --libs libxml-2.0`
-LIBXML_CFLAGS := $(shell $(PKG_CONFIG) --cflags libxml-2.0)
+c2xml: LOADLIBES += $(shell $(PKG_CONFIG) --libs libxml-2.0)
+c2xml: CFLAGS += $(shell $(PKG_CONFIG) --cflags libxml-2.0)
else
$(warning Your system does not have libxml, disabling c2xml)
endif
@@ -76,7 +76,7 @@ INST_PROGRAMS += test-inspect
test-inspect_EXTRA_DEPS := ast-model.o ast-view.o ast-inspect.o
test-inspect_OBJS := test-inspect.o $(test-inspect_EXTRA_DEPS)
$(test-inspect_OBJS) $(test-inspect_OBJS:.o=.sc): CFLAGS += $(GTK_CFLAGS)
-test-inspect_EXTRA_OBJS := $(GTK_LIBS)
+test-inspect: LOADLIBES += $(GTK_LIBS)
else
$(warning Your system does not have gtk3/gtk2, disabling test-inspect)
endif
@@ -94,7 +94,8 @@ LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null)
PROGRAMS += $(LLVM_PROGS)
INST_PROGRAMS += sparse-llvm sparsec
sparse-llvm.o: CFLAGS += $(LLVM_CFLAGS)
-sparse-llvm_EXTRA_OBJS := $(LLVM_LIBS) $(LLVM_LDFLAGS)
+sparse-llvm: LDFLAGS += $(LLVM_LDFLAGS)
+sparse-llvm: LOADLIBES += $(LLVM_LIBS)
else
$(warning LLVM 3.0 or later required. Your system has version $(LLVM_VERSION) installed.)
endif
@@ -190,7 +191,7 @@ compile_EXTRA_DEPS = compile-i386.o
$(foreach p,$(PROGRAMS),$(eval $(p): $($(p)_EXTRA_DEPS) $(LIBS)))
$(PROGRAMS): % : %.o
- $(QUIET_LINK)$(LD) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@ $($@_EXTRA_OBJS)
+ $(QUIET_LINK)$(LD) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(AR) rcs $@ $(LIB_OBJS)
--
2.14.2
next prev parent reply other threads:[~2017-10-04 13:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 13:25 [PATCH 0/6] build: various updates Uwe Kleine-König
2017-10-04 13:26 ` [PATCH 1/6] build: make PREFIX overwritable from the environment Uwe Kleine-König
2017-10-04 13:26 ` [PATCH 2/6] build: put comment about local.mk to the place where it is included Uwe Kleine-König
2017-10-06 19:04 ` Christopher Li
2017-10-04 13:26 ` [PATCH 3/6] build: drop BASIC_CFLAGS and ALL_CFLAGS Uwe Kleine-König
2017-10-06 19:09 ` Christopher Li
2017-11-01 17:05 ` Luc Van Oostenryck
2017-10-04 13:26 ` [PATCH 4/6] build: drop -g from LDFLAGS Uwe Kleine-König
2017-10-06 19:14 ` Christopher Li
2017-10-04 13:26 ` [PATCH 5/6] build: pass standard make variables to compiler and linker Uwe Kleine-König
2017-11-04 6:43 ` Luc Van Oostenryck
2017-10-04 13:26 ` Uwe Kleine-König [this message]
2017-10-06 19:19 ` [PATCH 6/6] build: replace *_EXTRA_OBJS by local assignments to LDFLAGS and LOADLIBES Christopher Li
2017-11-04 13:10 ` Luc Van Oostenryck
2017-10-06 19:03 ` [PATCH 0/6] build: various updates Christopher Li
[not found] ` <e3d57acc-e699-f51d-6687-e1535db4cd46@kleine-koenig.org>
2017-10-06 21:30 ` Christopher Li
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=20171004132605.24734-7-uwe@kleine-koenig.org \
--to=uwe@kleine-koenig.org \
--cc=linux-sparse@vger.kernel.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.