]> git.proxmox.com Git - mirror_qemu.git/commitdiff
contrib/elf2dmp: Build download.o with CURL_CFLAGS
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 22 Jul 2019 13:07:39 +0000 (14:07 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 22 Jul 2019 13:07:39 +0000 (14:07 +0100)
contrib/elf2dmp has a source file which uses curl/curl.h;
although we link the final executable with CURL_LIBS, we
forgot to build this source file with CURL_CFLAGS, so if
the curl header is in a place that's not already on the
system include path then it will fail to build.

Add a line specifying the cflags needed for download.o;
while we are here, bring the specification of the libs
into line with this, since using a per-object variable
setting is preferred over adding them to the final
executable link line.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20190719100955.17180-1-peter.maydell@linaro.org

Makefile
contrib/elf2dmp/Makefile.objs

index 386e13a6ea01af1e9e1f8a3445abfbad33f80805..ecb788b2ce303d18e269cf2a46cf16190457520d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -626,7 +626,6 @@ ifneq ($(EXESUF),)
 qemu-ga: qemu-ga$(EXESUF) $(QGA_VSS_PROVIDER) $(QEMU_GA_MSI)
 endif
 
-elf2dmp$(EXESUF): LIBS += $(CURL_LIBS)
 elf2dmp$(EXESUF): $(elf2dmp-obj-y)
        $(call LINK, $^)
 
index e3140f58cf74eef27b3df74cd9c8f8ffae70e805..1505716916067c044760b89f3da3a768578dd724 100644 (file)
@@ -1 +1,4 @@
 elf2dmp-obj-y = main.o addrspace.o download.o pdb.o qemu_elf.o
+
+download.o-cflags := $(CURL_CFLAGS)
+download.o-libs   := $(CURL_LIBS)