Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
5746a5fc
Commit
5746a5fc
authored
May 28, 2015
by
Marek Vavruša
Browse files
build: support versioned dependencies
parent
c493eea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
5746a5fc
...
...
@@ -26,7 +26,7 @@ $(eval $(call find_bin,doxygen))
$(eval
$(call
find_bin,sphinx-build))
$(eval
$(call
find_bin,gccgo))
$(eval
$(call
find_python))
$(eval
$(call
find_lib,libmemcached))
$(eval
$(call
find_lib,libmemcached
,1.0
))
# Work around luajit on OS X
ifeq
($(PLATFORM), Darwin)
...
...
platform.mk
View file @
5746a5fc
...
...
@@ -81,16 +81,21 @@ endef
# Find library (pkg-config)
define
find_lib
$(call
find_alt,$(1),$(1))
$(call
find_alt,$(1),$(1)
,$(2)
)
endef
# Find library alternative (pkg-config)
define
find_alt
ifeq
($$(strip $$($(1)_LIBS)),)
$(1)_CFLAGS
:=
$(
shell
pkg-config
--cflags
$(2)
--silence-errors
)
$(1)_LIBS
:=
$(
shell
pkg-config
--libs
$(2)
--silence-errors
)
ifneq
($(strip $(3)),)
$(1)_VER
:=
$(
shell
pkg-config
--atleast-version
=
$(3)
$(2)
&&
echo
$(3)
)
endif
ifeq
($(strip $(3)),$$($(1)_VER))
$(1)_CFLAGS
:=
$(
shell
pkg-config
--cflags
$(2)
--silence-errors
)
$(1)_LIBS
:=
$(
shell
pkg-config
--libs
$(2)
--silence-errors
)
endif
endif
$(call
have_lib,$(1))
$(call
have_lib,$(1)
,$(3)
)
endef
# Find binary
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment