[clinfo] 08/55: Unbreak Darwin build

Andreas Beckmann anbe at moszumanska.debian.org
Sat Jan 13 14:39:59 UTC 2018


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository clinfo.

commit 5def8d30c4093f0214098d5e6a110a83c7b5e96a
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Thu Oct 27 20:58:09 2016 +0200

    Unbreak Darwin build
    
    -lOpenCL should be removed from LDLIBS on Darwin. Use a trick similar
    to the one used for OS-specific inclusions to remove the unwated
    include.
---
 Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index b174df7..7f2ed48 100644
--- a/Makefile
+++ b/Makefile
@@ -18,17 +18,19 @@ SPARSEFLAGS=-Wsparse-all -Wno-decl
 RM ?= rm -f
 
 # Common library includes
-# TODO ideally we would want this to be on "not Darwin",
-# rather than shared, but I haven't found a way to achieve this
-# using features supported by both GNU and BSD make
 LDLIBS = -lOpenCL
 
 # OS-specific library includes
 LDLIBS_Darwin = -framework OpenCL
+LDLIBS_Darwin_exclude = -lOpenCL
+
 LDLIBS_Linux = -ldl
 
 LDLIBS += $(LDLIBS_${OS})
 
+# Remove -lOpenCL if OS is Darwin
+LDLIBS := $(LDLIBS:$(LDLIBS_${OS}_exclude)=)
+
 clinfo: clinfo.o
 
 clinfo.o: clinfo.c $(HDR)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-commits mailing list