Skip to content

Commit

Permalink
Unbreak Darwin build
Browse files Browse the repository at this point in the history
-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.
  • Loading branch information
Oblomov committed Oct 27, 2016
1 parent 1210cbe commit 5def8d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5def8d3

Please sign in to comment.