summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2014-07-20 17:39:27 -0500
committerTim Angus <tim@ngus.net>2014-08-28 11:13:03 +0100
commit4d04096c324adf88e9cf5f427b4a0d01c31c5e49 (patch)
treedd85bd0eea1a39c40b378f2d4c542f124a3935b8 /Makefile
parentb51c9cf3e26ce7d45f0b775c4d69e04cbba52d75 (diff)
Allow user override of cURL, OpenAL, and SDL libs/cflags
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 35f56a2a..f87fbde1 100644
--- a/Makefile
+++ b/Makefile
@@ -258,22 +258,22 @@ ifneq ($(BUILD_CLIENT),0)
# set PKG_CONFIG_PATH to influence this, e.g.
# PKG_CONFIG_PATH=/opt/cross/i386-mingw32msvc/lib/pkgconfig
ifneq ($(call bin_path, pkg-config),)
- CURL_CFLAGS=$(shell pkg-config --silence-errors --cflags libcurl)
- CURL_LIBS=$(shell pkg-config --silence-errors --libs libcurl)
- OPENAL_CFLAGS=$(shell pkg-config --silence-errors --cflags openal)
- 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)
+ CURL_CFLAGS ?= $(shell pkg-config --silence-errors --cflags libcurl)
+ CURL_LIBS ?= $(shell pkg-config --silence-errors --libs libcurl)
+ OPENAL_CFLAGS ?= $(shell pkg-config --silence-errors --cflags openal)
+ OPENAL_LIBS ?= $(shell pkg-config --silence-errors --libs openal)
+ SDL_CFLAGS ?= $(shell pkg-config --silence-errors --cflags sdl2|sed 's/-Dmain=SDL_main//')
+ SDL_LIBS ?= $(shell pkg-config --silence-errors --libs sdl2)
else
# assume they're in the system default paths (no -I or -L needed)
- CURL_LIBS=-lcurl
- OPENAL_LIBS=-lopenal
+ CURL_LIBS ?= -lcurl
+ OPENAL_LIBS ?= -lopenal
endif
- # Use sdl-config if all else fails
+ # Use sdl2-config if all else fails
ifeq ($(SDL_CFLAGS),)
ifneq ($(call bin_path, sdl2-config),)
- SDL_CFLAGS=$(shell sdl2-config --cflags)
- SDL_LIBS=$(shell sdl2-config --libs)
+ SDL_CFLAGS ?= $(shell sdl2-config --cflags)
+ SDL_LIBS ?= $(shell sdl2-config --libs)
endif
endif
endif