diff options
author | Simon McVittie <smcv@debian.org> | 2013-05-19 20:57:04 +0100 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-08-28 11:02:36 +0100 |
commit | f68e028a522f2cd7e8211da8d02e97756c16ae85 (patch) | |
tree | 04e910a304ab9ff691aef76b4610f9e042a8896f /Makefile | |
parent | d71cebdc958799094a244f2893f8ef0ef3a54ca8 (diff) |
Allow libcurl to be in a non-standard location on all platforms
We didn't add CURL_CFLAGS to CLIENT_CFLAGS on all platforms, and didn't
use CURL_LIBS at all, so if "pkg-config --libs" returned "-L... -lcurl"
or even "/.../libcurl.a", it wouldn't work.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -264,6 +264,9 @@ ifneq ($(BUILD_CLIENT),0) OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal) SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 's/-Dmain=SDL_main//') SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl) + else + # assume they're in the system default paths (no -I or -L needed) + CURL_LIBS=-lcurl endif # Use sdl-config if all else fails ifeq ($(SDL_CFLAGS),) @@ -366,8 +369,9 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu")) endif ifeq ($(USE_CURL),1) + CLIENT_CFLAGS += $(CURL_CFLAGS) ifneq ($(USE_CURL_DLOPEN),1) - CLIENT_LIBS += -lcurl + CLIENT_LIBS += $(CURL_LIBS) endif endif @@ -447,8 +451,9 @@ ifeq ($(PLATFORM),darwin) endif ifeq ($(USE_CURL),1) + CLIENT_CFLAGS += $(CURL_CFLAGS) ifneq ($(USE_CURL_DLOPEN),1) - CLIENT_LIBS += -lcurl + CLIENT_LIBS += $(CURL_LIBS) endif endif @@ -658,8 +663,9 @@ ifeq ($(PLATFORM),freebsd) endif ifeq ($(USE_CURL),1) + CLIENT_CFLAGS += $(CURL_CFLAGS) ifeq ($(USE_CURL_DLOPEN),1) - CLIENT_LIBS += -lcurl + CLIENT_LIBS += $(CURL_LIBS) endif endif @@ -750,7 +756,7 @@ ifeq ($(PLATFORM),openbsd) ifeq ($(USE_CURL),1) ifneq ($(USE_CURL_DLOPEN),1) - CLIENT_LIBS += -lcurl + CLIENT_LIBS += $(CURL_LIBS) endif endif else # ifeq openbsd |